Phonegap/cordova connection.type
I have a problem with connection.type on cordova '2.9.0-0-g83dc4bd'
I have the following function:
function checkConnection() {
var networkState = navigator.connection.type;
alert(networkState);
}
when I call the "checkConnection" function, if the device is connected to
internet, the function print the message WIFI/3G; but, if the device is
not connected to internet it does not print anything. I was expecting a
"NONE" message but nothing happens.
I'm developing for Android using Eclipse, and when this happens, the
logcat don't shows anything related with this problem.
Thanks
No comments:
Post a Comment