Plug-Ins, APIs, ...

135 views
Skip to first unread message

Alan Hendry

unread,
Oct 6, 2020, 8:40:11 AM10/6/20
to DroidScript
Hi,
This may be a dumb question (or require a massive development effort), but
Would it be possible to use Plug_ins from other free software?
Possibly with an interface between DS and the plug-ins.
Regards, ah 



Message has been deleted

Dave

unread,
Oct 6, 2020, 10:04:24 AM10/6/20
to DroidScript
You can use many plugins from here already:-   https://www.npmjs.com/

You might need to use a tool call 'Browserify' to convert them to work in the browser/DS if the author has not done so already.  Not all plugins will work however (especially if they use file access or low level IO), but any that claim to work in the browser should also work in DS.

A useful trick when using Browerify, is to put something like this into your index.js file (which is required when using Browserify)

window.thePlugin = require( "theplugin.js" )

and then include the Browserified bundle into your app using app.Script().  The 'thePlugin' global variable will then give you access to the object inside the npm package.   Alternatively you could add support for the require function into DS, by using one of the available js libs out there.

Alan Hendry

unread,
Oct 12, 2020, 4:47:47 AM10/12/20
to DroidScript
Hi,
I was thinking more along the lines of "borrowing" plug-ins from (free / open source) Android development tools where legal and permitted
(Cordova, ExtJS, NativeScript, Android JS, Titanium, ...)
Regards, ah

Dave

unread,
Oct 12, 2020, 7:53:39 AM10/12/20
to DroidScript
You can also use Cordova plugins, but you need to extract the Android parts and use the following Java files to emulate the Cordova container:-

Reply all
Reply to author
Forward
0 new messages