my first time experimenting with Apache Cordova 3.0.
downloaded lib, unziped cordova-android and cordova-js and created a project:
./create ~/Docume
I am playing with the same thing and I think you need to install the features using this page by the use of cordova CLI.
for me adding the plugin was not enough and didn't solve my issue...
Then I did in the CLI after I added the plugin
$ cordova build
and everything worked perfectly ! Make sure your /www file has the updated files because it will be used to erase the platforms/xxx/www files
I face the same problem, searching about this issue I found this question. I try many ideas, but the one did works was: 1- uninstall the network-information plugin 2- in the CMD -> cordova build 3- Install the plugin again 4- Build again.
After this The connection example works fine.
I'm using cordova 3.4.1 adding the plugin org.apache.cordova.network-information it fix my problem, try this:
cordova plugin add org.apache.cordova.network-information
I did not change any part of the code, as the help says:
https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md
I had the same exact problem, but was able to fix it. Running the below commands as per the Phonegap Connection docs doesn't seem to work:
$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
$ cordova plugin rm org.apache.cordova.core.network-information
Instead, I had to use:
$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
Once I did that, it worked.
I had the same problem with PhoneGap 3.5.0:
navigator.connection.typereturned me
0(unknown connection) and
navigator.onLine(from HTML5) was
true` all the time.
The problem was caused by the phone (probably I have too old Android version on my phone) because it works with emulator and with tablet (where is Android 4.2) correctly :-(