How to add/use plugins in Phonegap 3.0

Phonegap 3.0 plugins can be added to the project using the CLI (Command Line Interface). Phonegap 3.0 had made the developers life much easier to utilize the plugins. We just need to follow two basic steps to use the plugins.

Here are the two basic steps we need to flow.
1. Adding the plugin to application
2. Implementing the javascript function

Before moving forward, I would like to elaborate the basic structure used with Phonegap 3.0 plugins. The plugins will be having the below structure. Continue reading

Simple steps to create phonegap 3.0 plugin for Android

Phonegap plugins allows us to customize the way to use the native features as per our need. Basically, the communication between JavaScript and native code is accomplished by the bridge provided by Phonegap.
Starting with the Android platform, to develop plugin, it follows some basic flow. We need to call cordova.exec() function in JavaScript, which will be mapped with our execute() method defined in our native java file. We can also pass useful parameters and can also define the success and error callback methods to trace the flow.

Here are three basic steps we need to flow to create the plugin.
1. Creating the Native Java Interface
2. Creating the JavaScript Interface
3. Configuring the plugin Continue reading