Page 1 of 1

Phonegap Plugins

PostPosted: Sat Sep 19, 2015 4:37 am
by luishp
I need to develop an App with local notifications (alarms even if the app is not in the foreground).
I think the only way to accomplish this is by using Phonegap plugins, and I have found ngCordova:

http://ngcordova.com/docs/

"It gives you simple AngularJS wrappers for the most popular Cordova and PhoneGap plugins available, where you can take a picture, scan a barcode, upload a file, turn on your flashlight, get your current location, and much more with just a few lines of code"

Is there currently or in the future any workaround to use this in NAB?
If not, any idea on how to achieve local notifications functionality?

Thanks!

Re: Phonegap Plugins

PostPosted: Sun Sep 20, 2015 6:24 pm
by Neosoft Support
In order to load PhoneGap plugins automatically we'll need to add a few lines of code to the config.xml created by NAB's compiler. It will also be necessary to create NeoScript actions for each plug-in. This is planned for a future version.

In the mean time, you could add plug-ins yourself. The config.xml file is stored in the zip file created by NAB that you upload to PhoneGap. In theory, you could edit this file to add the needed plug-ins and put it back into the zip before uploading to PhoneGap. You could then access the functions of the plug-in from NAB through JavaScript.

Here's are the PhoneGap docs that describe how to add plug-ins to the config.xml file:

http://docs.build.phonegap.com/en_US/configuring_plugins.md.html#Plugins