Extending your Cordova Android application with a native plugin
Android devices have been proven to be developer friendly insofar as they easily allow us to test and deploy unsigned applications throughout the development process.
How to do it...
In this recipe, we will create a native Android plugin for our Cordova application, using command-line tools as suggested by Cordova:
- Create a new directory named
helloplugin
. Then, create two blank directories,www
andsrc
, from the root. Next, create an empty file calledplugin.xml
. Now, we have a Cordova plugin project to get started, as shown here: - We open
plugin.xml
and paste the following code for basic information about the plugin that we are going to make:<?xml version="1.0" encoding="utf-8"?> <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.example.hello" version="0.7.0"> <name>Hello</name> <engines> <engine name="...