I have one mobile. i need test mobile have internet or not. I tried like this
function onLoad() {
document.addEventListener("online", onOnline, false);
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
alert("selectitem");
}
function onOnline() {
alert("deivce have enternet");
}
and we tried other way like this
if (navigator.onLine) {
}
both methods are not working for me.
We developing Phone-Gap app. after install app will be need to check mobile have Internet or not.