In my sencha touch application i am unable to retrieve internet connection, but device able to access the wifi when i try to surf through browser. In android its working fine, but in ios the connection is undefined. I am using same wifi for both devices.
checkConnection: function() {
if (Ext.os.is('android') || Ext.os.is('iphone')) {
alert("connection"+Ext.device.Connection.isOnline());
alert('Your connection type is: ' + Ext.device.Connection.getType());
return Ext.device.Connection.isOnline();
}
Are you using phonegap/cordova? If so then why don't you use the cordova network API directly? I.e. try something like
checkConnection: function() {
if (Ext.device) {
return Ext.device.Connection.isOnline();
} else {
return navigator.network.connection.type != Connection.NONE;
}
return false;
}