如何使用sencha Touch2检查iPad的WiFi连接类型

how to check which type of wifi connection in ipad using sencha touch2(如何使用sencha Touch2检查iPad的WiFi连接类型)

本文介绍了如何使用sencha Touch2检查iPad的WiFi连接类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了使用Sencha Touch2的联系人屏幕页面。我的要求是,基于2G/3G之类的WiFi连接类型取决于此。我想禁用iPad中的一些按钮。谁能提供使用sencha Touch2实现这一点的最佳方法。

推荐答案

我在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 Touch2检查iPad的WiFi连接类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何使用sencha Touch2检查iPad的WiFi连接类型