my first time experimenting with Apache Cordova 3.0.
downloaded lib, unziped cordova-android and cordova-js and created a project:
./create ~/Docume
For me it was because I was calling checkConnection() inside $(function(){}). It should be called by
document.addEventListener("deviceready", function(){ checkConnection(); });