android - Manually install Device plugin (and others) into cordova 3.0 -


phonegap/cordova 3.0 has moved modular design starting version 3.0. example, call device.version api, need include device plugin project.

anyone can provide me clear instructions on how install device (or other) cordova api plugin new ios project (using xcode) , android (using eclipse)?

all find details using node.js and/or plugman. needing automated script basic job of adding plugin undesirable me, not processes doing things don't understand (behind scene).

in past (cordova 2.9), did following add third-party plugin in (say android) worked perfectly:

  1. put plugin .java code /src folder
  2. put plugin .js code in www folder
  3. import .js file index.html
  4. add feature tag in config.xml
  5. call plugin in javascript

i never added plugins in ios before.

however, assumed above process should work fine cordova-based plugins, did not. point, did not try android, tried ios no luck.

i included cdvdevice.h , cdvdevice.m in /plugins folder. imported device.js index.html, , modified config.xml! try android after finishing ios.

please, if know how manually let me know.

thank in advance.

i ran same issue.

in fact, plugin system has not changed much.

i added date picker plugin android :

  • add classes (.m .h iphone, .java android)
  • add js files want
  • add link js files in index.html
  • edit config.xml (path depends on os used) :

instead of adding plugins between plugins tags :

<plugin name="datepickerplugin" value="com.phonegap.plugins.datepickerplugin"/> 

you add feature (what revolution !) :

<feature name="datepickerplugin" >     <param name="android-package" value="com.phonegap.plugins.datepickerplugin"/> </feature> 

and !

if not sure os syntax param name, can add default cordova plugin using command 1 :

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git 

more info there : http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#the%20command-line%20interface


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -