简体   繁体   中英

cordova.js for android phonegap application

I am developing android app , but i can't able to find cordova.js to detect events . Please help me in finding this ? I tried on google code base , but they did not work .

If you are using phonegap build CLI utility (which I find is the easiest way), then you don't need to include the cordova.js or phonegap.js files manually in the www directory in the project as they are added by the phonegap build utility automatically.

You do need to add the following though in all html files:

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>

As far as phonegap functionality is concerned, you might need to instal some plugins as described here .

For example if you want to add the accelerometer functionality you would have to enter the following command while in the phonegap project directory:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM