I’ve created a hybrid app using Cordova, and notice I’m able to pull the header down and footer up, which lead to weird behaviour when using the app (at least I feel so).
Adding single line of configuration in config.xml solve the issue. (pheeew… spend couple of hours to research this)
<preference name="DisallowOverscroll" value="true"/>
If you would like to trigger the “deviceready” event fires when Cordova is fully loaded for some plugin usage,
document.addEventListener("deviceready", callbackFunction, false);
you need to include cordova.js in your application.
OK, you are done.
If you facing some unknown error in console as below even you have whitelist plugin added, cordova.js included,
Uncaught Error: Module cordova-plugin-whitelist.whitelist does not exist.
cordova.js:891 deviceready has not fired after 5 seconds.
cordova.js:884 Channel not fired: onPluginsReady
cordova.js:884 Channel not fired: onCordovaReady
then probably you include cordova.js wrongly as what I did (get from /platforms/android/assets/www/cordova.js)
NOTE: You does not need to copy cordova.js from anywhere, just include as above mention will do, Cordova will figure out for u 🙂
You have already set the cordova and git in your PATH, but still facing above mention problem.
Try to rename .bash_profile to something else and restart netbeans.
If that helps, means you have some “dirty” code in your .bash_profile which you may remove it.
(as in my case, I have an echo statement which prevent me to create cordova application)
If it doesn’t, continue google 🙂
p/s: To confirm you have cordova and git in your PATH, there must be version number return when you issue command below in terminal (line by line):