-->

如何使用Sencha touch2检查在ipad wifi连接的哪种类型(how to check

2019-09-19 03:49发布

我已经开发使用Sencha touch2接触屏幕页面。 我的要求是,根据类型像2G / 3G依赖于WiFi连接的。 我想在ipad禁用某些按键。 任何一个可以提供最佳的方式如何实现这一个使用Sencha touch2。

Answer 1:

我已搜查在煎茶网站,他们清楚地给出如何让互联网连接的类型。 这是工作的罚款。

这里是解决方案:

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


文章来源: how to check which type of wifi connection in ipad using sencha touch2