cordova - How to Use Plugins with PhoneGap Build 3.x? -


i writing phonegap build 3.x program, , cannot figure out how configure config.xml , index.html files access of plugins. here config.xml file:

<?xml version="1.0" encoding="utf-8"?> <widget xmlns     = "http://www.w3.org/ns/widgets"         xmlns:gap = "http://phonegap.com/ns/1.0"         id        = "org.kirsches.pgb"         version   = "1.0.0">     <name>phonegap build test</name>      <description>phonegap build test</description>      <author href="http://www.kirsches.org" email="mitch@kirsches.org">         mitch kirsch     </author>      <preference name="phonegap-version" value="3.1.0" />     <preference name="orientation"      value="default" />     <preference name="target-device"    value="universal" />     <preference name="fullscreen"       value="false" />     <preference name="android-minsdkversion" value="7" />      <gap:platform name="android" />      <gap:plugin name="org.apache.cordova.device" />      <icon src="icon.png" /> </widget> 

and here index.html file:

<!doctype html> <html>    <head>       <title>phonegap build test</title>       <script src="cordova.js"></script>       <script src="phonegap.js"></script>       <script >          document.addeventlistener('deviceready',                                    ondeviceready,                                    false);           function ondeviceready() {             alert("using phonegap 3.1.0");             alert("model = " + device.model);          }       </script>    </head>    <body>       <h2>phonegap build test</h2>    </body> </html> 

the "using phonegap 3.1.0" alert fires, application hangs on android device. incorrect in assuming don't need set androidmanifest.xml file, since using phonegap build (it understanding phonegap build generates androidmanifest.xml file config.xml file)? or, missing in config.xml file (it understanding feature tag no longer used phonegap 3.x)?

thank can show me error in above 2 files.

the odd thing fact include phonegap.js , cordova.js. pick one, doesn't matter, phonegap build injects correct file (as long have 1 of tags). in case have: don't include actual files.

hope makes difference.. eddy


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -