DroidScript Plugin SDK
You can build DroidScript plugins directly on your phone or tablet using AIDE and generate AIDE template plugins from the DroidScript ‘SDK’ menu (see forum for more details)
A number of open source example plugins also exist on GitHub and Android Studio users may prefer to use the plugin samples found there.
To use the plugin SDK, please make sure you have Eclipse installed and follow the steps below. Note, the plugin project generator is currently only supported on Windows.
Installing and using the Plugin SDK
Download the plugin SDK and extract the zip file to a folder on your Windows machine and run the DSPluginGen.hta file by double clicking on it. It will allow you to generate an Eclipse project. If you have an ADB connection to your device (recommended), then it will also copy a sample DroidScript App to your device too.
Once you have successfully built your plugin in eclipse, then you can drop the zipped up plugin file into a folder on your device called /sdcard/DroidScript/Plugins and it will be imported into DroidScript along with your plugin’s documentation. You should be able to run a sample snippet directly from the ‘Plugins’ section of the DroidScript documentation after that.
Importing and building with Eclipse
Import the project into your Eclipse Workspace:
- File->Import… and select ‘Existing Projects into Workspace’
- Browse to your plugin project folder then you should see your plugin project in the ‘Projects’ list
- Select you plugin project and click Finish
To build your plugin:
- Right-click on pluginBuild.xml and select Run As->Ant Build
- Check the Console for build output
To Install the plugin:
- Make sure your phone is connected via USB and adb is enabled
- Run Install.bat from your plugin project directory
- Launch DroidScript on your phone to complete the install