我已经使用 sencha touch2 开发了联系屏幕页面。我的要求是,基于 2G/3G 等 wifi 连接类型取决于此。我想禁用 ipad 中的某些按钮。任何人都可以提供如何使用 sencha touch2 实现这一目标的最佳方法。
问问题
621 次
1 回答
1
我在 sencha 网站上进行了搜索,他们清楚地给出了如何获得互联网连接的类型。它工作正常。
这是解决方案:
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
于 2012-07-06T08:33:21.510 回答