Creating DroidScript Plugins on Desktop PC with Android Studio
Install Android Studio
1. Download and select the AndroidStudio executable on https://developer.android.com/studio/index.htmlDownload and Build the UserPlugin Template
3. Download the UserPlugin template from https://github.com/DroidScript/Plugin-UserPlugin and extract it to your AndroidStudio project folder
(for me it was C:\Users\user\AppData\Local\Android\sdk\platform-tools\adb)
You need to enable developer options and USB debugging on your device for that.
Also be sure that the .apk path to the generated apk and the target path on your device is correct.
Install the Plugin in DroidScript
8. Restart DroidScript on your device so that your plugin will be installed. Now you can try out an example from Docs/Plugins/MyPluginAdditional informations to the files in your plugin project folder
app/assets/MyPlugin.inc
This is the JavaScript side of your plugin. It is recommended to create shortcuts to each of your plugin functions to simplify the calling process for the users You can also create a JavaScript plugin by writing your plugin code into this file - but there are easier ways ;)
app/assets/MyPlugin.html
This is the documentation page for your plugin inside DroidScript There you should
- explain what your plugin does - place clear and simple standalone examples of how to use the plugin - support a complete list of every available function with arguments and return values (feel free to use the DocsModifier app for that)
very cool, congratulations, the question is will we be able to make an admob plugin, type generate a banner plugin to be added inside the droidcript layouts?
ReplyDeleteOf course you will. You can add every control you want this way.
DeleteIn fact you can do everything like in normal java apps this way.
It might be worth doing some research in the DS forum because this was discussed a lot there.
Deletehttps://groups.google.com/forum/#!searchin/androidscript/admob%7Csort:date
i.e. here Dave mentioned that the admob libraries could get into conflict with DS.
https://groups.google.com/forum/#!topic/androidscript/7obr8qJ2EeM