1

Back-story: I built a web app and used Cordova to build it as an apk. When I started to add another piece to the app which required better performance, I found out that Cordova uses the native Android browser, which in turn I found Crosswalk and tried to change it with no luck. Then I found out about Intel XDK.

Problem: I'm now using Intel XDK which builds with Crosswalk beautifully, but with Cordova I used plugins for the Android system functions, such as battery status. Now I'm trying to use the same plugins which are included on the Build screen of the XDK but I'm not sure how to actually use them. To my knowledge, I believe the XDK does not allow "Cordova Plugins", but do not really show how to use the plugins given in the options before building. It simply has a yes/No switch. enter image description hereHow do I actually gain control of them in my code?

By the way, here is my file structure from when I used Cordova only. The folder plugins contains all the js files for each plugin. I hope this helps in clarifying my situation.

enter image description here

Thanks

Martavis P.
  • 1,708
  • 2
  • 27
  • 45

1 Answers1

1

The switches you see in the image you provided enable and disable the core set of Cordova plugins that are available with the Crosswalk build system. These "core Cordova" plugins are defined here: https://crosswalk-project.org/#wiki/Plugins-List-@-3.3.0-Supported-by-Crosswalk-Cordova-Android. That page can be found from this XDK doc page: http://software.intel.com/en-us/html5/articles/using-the-crosswalk-for-android-build-option.

The standard set of "core Cordova plugins" are defined here: http://cordova.apache.org/docs/en/3.3.0/.

The XDK will support custom and third-party plugins in the future, but does not currently provide support for them. If the plugin you were using with Cordova CLI is one of these "core plugins" you should have access to it.

BTW: you should disable the plugins you don't need in order to eliminate excess permissions associated with your app.

xmnboy
  • 2,314
  • 2
  • 14
  • 31
  • Thank you for your response. I've read those pages, but what is not clear is how to actually use the plugins. Any ideas on that? – Martavis P. Apr 11 '14 at 23:44
  • When you go to http://cordova.apache.org/docs/en/3.3.0/ you will see a set of APIs, for example: Accelerometer, Camera, Capture, etc. If you check the image above, it also lists: Accelerometer, Camera, Capture, etc. Each "plugin" corresponds to a set of APIs. The APIs are described on the 3.3.0 page I referenced. Enabling a plugin (setting the switch to "Yes") enables the availability of that API in your built app. If you disable a plugin (setting the switch to "No) the corresponding API will not exist in your built app, even though it may be available in the emulator. – xmnboy Apr 14 '14 at 04:54