how to check which type of wifi connection in ipad using sencha touch2

天涯浪子 提交于 2019-12-08 03:12:19

问题


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.


回答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


来源:https://stackoverflow.com/questions/11357301/how-to-check-which-type-of-wifi-connection-in-ipad-using-sencha-touch2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!