function CheckInternetConnectivity()
{
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function() { HandleReply(httpRequest); };
httpRequest.open("GET", "
http://google.com/", true);
httpRequest.send(null);
function HandleReply( httpRequest )
{
if( httpRequest.readyState==4 ) {
if( httpRequest.status==0 ) {
app.Alert( "Internet is not connected \n You will see offline map");
app.SendIntent("com.google.android.apps.maps",null,"android.intent.action.VIEW","android.intent.category.DEFAULT","geo:0,0?q=" + GetLong+","+GetLat);
}
else {
layLocation.SetVisibility("Show");
VehicleLocation.LoadUrl(GetLoc);
}
}
}
}