The plugin on the Javascript, please test.

142 views
Skip to first unread message

Dimon

unread,
Apr 30, 2016, 3:31:47 PM4/30/16
to androi...@googlegroups.com
Hello. I created my first plugin using SDK DroidScript v.1.34, if you find the time, please check and point out the flaws.

Dave Smart

unread,
Apr 30, 2016, 5:49:57 PM4/30/16
to DroidScript
Sorry Dimon,

We can't allow apks to be published here for security reasons, please post the source code to your plugin here instead or put it on Github.

Thanks
David

Dimon

unread,
Apr 30, 2016, 6:27:14 PM4/30/16
to DroidScript
Sorry, I did not know about these limitations. Here is an archive, you need to create a project called "FileManager" and replace files with the same name.
FileManagerSource.zip

Timo Octazid

unread,
May 1, 2016, 5:16:03 AM5/1/16
to DroidScript
Hi,
If I try to create a plugin I see a empty pluginlist after the installation.
Whats wrong?
Screenshot_2016-05-01-09-23-07.png

Timo Octazid

unread,
May 1, 2016, 5:17:55 AM5/1/16
to DroidScript
...but after the deinstallation of the plugin all is fine with the pluginlist...

Dave Smart

unread,
May 1, 2016, 5:19:28 AM5/1/16
to DroidScript
Sounds like a character or space in the name that DroidScript does not like.  

What did you call your plugin?

What package name did you use?

Timo Octazid

unread,
May 1, 2016, 5:25:35 AM5/1/16
to DroidScript
I created a zip file called "filemanager" with the 4 files in it like in the MyPlugin example. After that I put the file in the plugin folder within DS. If I start DS I see the PopUp "plugin installed" but the list is empty...
Message has been deleted

Dave Smart

unread,
May 1, 2016, 5:36:51 AM5/1/16
to androi...@googlegroups.com
OK, I've fixed it.

1. First of all the zip should be called FileManager.zip
2. The empty file should be a .jar file not a .java file.

It's a nice example of how to create pure JavaScript plugins.  Well done Dimon :)

Try it now.

Dimon: If you want to add images and resources, make sure they go at the top level of the zip, anything at a lower level folder will be discarded when building an APK (good for docs though).  All assets at the top level folder will be copied into the 'Plugins' private folder and can be accessed at run time.

Here is a snippet from the micro:bit plugin that shows how to access images from your plugin at run time.

var plugDir = app.GetPrivateFolder( "Plugins" );
var img = app.CreateImage( plugDir+"/microbit/micro-bit.png", sz );


Regards
David
FileManager.zip
Message has been deleted
Message has been deleted

Dimon

unread,
May 1, 2016, 5:50:18 AM5/1/16
to DroidScript
Thank you, Dave. I'm sorry, I mixed up the files ".jar" and ".java" and brought the problem to users.

Dave Smart

unread,
May 1, 2016, 5:53:40 AM5/1/16
to DroidScript
No worries Dimon, I'm just happy to see people making plugins :)

Timo Octazid

unread,
May 1, 2016, 7:35:39 AM5/1/16
to DroidScript
>>Thank you, Dave. I'm sorry, I mixed up the files ".jar" and ".java" and brought the problem to users.

:-) I have not see that. That was the problem... Thank you Dave!

Dimon

unread,
May 1, 2016, 8:07:39 AM5/1/16
to DroidScript
Here is the final version at the moment
FileManager.zip
Reply all
Reply to author
Forward
0 new messages