Open dested opened 7 years ago
What use-case do you have in mind? Btw.. You can still cd into the build folder and run cordova plugin add.
IMO it would be useful to be able to call something like:
$ tabris plugin add tabris-plugin-maps#v2.0.0 --save
... which would insert a plugin entry into the config.xml.
And perhaps a prompt to run a build immediately thereafter.
I added my custom cordova plugin to cordova/config.xml(plugin tag). I made a build with help of gradle. How can I use my plugin in js ? My www/chat.js (cordova plugin) include "module.exports = Chat" where chat is an object with some menthods.
In my tabris js www i tried cordova.require("cordova/my_custom_cordova_plugin") returns undefined cordova.plugins.my_custom_cordova_plugin not working returns undefined
I really dont know where to ask this question. There is not a lot of "how to" articles about tabris
I consider my question as relative
@truthSeekr This issue is related to integrating plugins in to the app's source code rather than using them at runtime so your question belongs in the Tabris.js issue tracker.
The answer depends on the plugin. Generally plugins inject globals in to the JS for use. The only difference between Tabris.js and Cordova is that you do not need to wait for the device.ready
event in Tabris.js. You'll need to refer to the plugin's documentation for how it is invoked in the JS code.
You can take a look at the example code for the plugins that are shipped with the Tabris.js developer app. For example, with the barcode scanner plugin it is only necessary to call cordova.plugins.barcodeScanner.scan
with two callbacks.
I opened my question here if anyone interesting in helping me figure it out https://github.com/eclipsesource/tabris-js/issues/1552
There needs to be some level of cordova plugin support, something like tabris plugin add x.