1

I have developed contact screen page using sencha touch2. my requirement is, based on type of wifi connection like 2G/3G depends on that. I want to disable some button in ipad. can any one provide the best way how to achieve this one using sencha touch2.

Ramesh Lamani
  • 1,117
  • 3
  • 25
  • 54

1 Answers1

1

I have searched in sencha website they given clearly how to get type of internet connection. it is working fine.

Here is solution:

Determining if the current device is online:

alert(Ext.device.Connection.isOnline());

Checking the type of connection the device has:

alert('Your connection type is: ' + Ext.device.Connection.getType());

The available connection types are:

    UNKNOWN - Unknown connection
    ETHERNET - Ethernet connection
    WIFI - WiFi connection
    CELL_2G - Cell 2G connection
    CELL_3G - Cell 3G connection
    CELL_4G - Cell 4G connection
    NONE - No network connection
Ramesh Lamani
  • 1,117
  • 3
  • 25
  • 54