connectionType

当前网络连接类型,如 2g、3g、4g、wifi 等,字符串类型

取值范围:

  1. unknown //未知
  2. ethernet //以太网
  3. wifi //wifi
  4. 2g //2G网络
  5. 3g //3G网络
  6. 4g //4G网络
  7. none //无网络

示例代码

  1. var connectionType = api.connectionType; //比如: wifi

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本