Sunday, July 27, 2014

Adding plugin to cordova project

Step by step : Platform –android ,OS-Window;

Adding plugin to cordova project using Command –line interface.
Step 1: open cmd .go to project directory. press enter.
Step 2: search for plugin that you want to add . I listed all plugin that I used efficiently as :

Plugin 1:
For device information as:
  • device.cordova :installed version of cordova
  • device.model : returns the name of the device's model or product.
  • device.name : similar to model
  • device.platform : Get the device's operating system name.
  • device.uuid : Get the device's Universally Unique Identifier (UUID). returns the device IMEI (International Mobile Equipment Identity or IMEI is a number unique to every GSM and UMTS mobile phone.
  • device.version : Get the operating system version.

>cordova plugin add org.apache.cordova.device

For more information to this plugin : use this site ( https://github.com/apache/cordova-plugin-device/blob/master/doc/index.md )

Plugin 2:
Network Connection and Battery Events:
> cordova plugin add org.apache.cordova.network-information


Plugin 3:
Media plugin : This plugin provides the ability to record and play back audio files on a device.

> cordova plugin add org.apache.cordova.media


Plugin 4:
Admob plugin: placed google ads in application.
> cordova plugin add https://github.com/floatinghotpot/cordova-plugin-admob.git


Need proper working example :please mail me at jk2386@gmail.com .

Plugin 5:
Canvas2ImagePlugin :directly copy canvas and save image in phone gallery.




 Please mail me at : jk2386@gmail.com  or leave your question in comments.
All the above are tested practically ,So need proper working example :please mail me at jk2386@gmail.com .


No comments:

Post a Comment