Javascript 如何使用sencha touch2检查ipad中的wifi连接类型
我使用sencha touch2开发了联系人屏幕页面。我的要求是,基于像2G/3G这样的wifi连接类型取决于此。我想禁用ipad上的一些按钮。有谁能提供使用sencha touch2实现这一目标的最佳方法。我在sencha网站上搜索过,他们清楚地给出了如何获得互联网连接类型。它工作得很好 以下是解决方案:Javascript 如何使用sencha touch2检查ipad中的wifi连接类型,javascript,sencha-touch,sencha-touch-2,Javascript,Sencha Touch,Sencha Touch 2,我使用sencha touch2开发了联系人屏幕页面。我的要求是,基于像2G/3G这样的wifi连接类型取决于此。我想禁用ipad上的一些按钮。有谁能提供使用sencha touch2实现这一目标的最佳方法。我在sencha网站上搜索过,他们清楚地给出了如何获得互联网连接类型。它工作得很好 以下是解决方案: Determining if the current device is online: alert(Ext.device.Connection.isOnline()); Checkin
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
我在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
大家好,我有办法了。我已经在下面给出了如何实现这一点,请参见下面的示例当您下载Sencha Touch时,您有一个“示例”文件夹。看看吧,答案经常在那里。大家好,我找到了答案。我已经在下面给出了如何实现这一点,请参见下面的示例当您下载Sencha Touch时,您有一个“示例”文件夹。看看吧,答案经常在那里。