Reputation: 7082
I am able to add the plugin which is designed by Apache though cordova command line interface for android platform. But I could not able to add the plugin which are designed by own though the CLI. please help me sort out to add plugins which is made by own in cordova3.1 project.
Upvotes: 0
Views: 783
Reputation: 7082
After a lot of struggle I found the solution for the above problem.
CordovaDemo/www/js/your.js
Edit the CordovaDemo/www/index.html
Add below script tag
< script type="text/javascript" src="js/your.js">
Add your YourPlugin.java file inside the src of your android platform
6.Add this inside res/xml/config.xml
< feature name="YourPlugin">
< param name="android-package" value="yourpackage.YourPlugin" />
< /feature>
Import android project in eclipse and run
Upvotes: 1
Reputation: 4978
If you create a plugin.xml file in your custom plugin directory (read this doc on how to do this: http://cordova.apache.org/docs/en/3.1.0/plugin_ref_spec.md ), you should be able to either:
cordova plugin add http://github.com/youraccount/yourrepo/
cordova plugin add relative/path/to/dir/containing/plugin.xml
or cordova plugin add /absolution/path/to/dir/containing/plugin.xml
Using the plugin.xml lets you leverage the automatic injection of xml into the config.xml, etc.
Upvotes: 1