获取网络类型 public class IntenetUtil { //没有网络连接 public static final int NETWORN_NONE = 0; //wifi连接 public static final int NETWORN_WIFI = 1; public static final int UnCon_WIFI = 7; //手机网络数据连接类型 public static final int NETWORN_2G = 2; public static final i
public static final String NETWORK_CLASS_UNKNOWN = "unknown"; public static final String NETWORK_CLASS_WIFI = "wifi"; public static final String NETWORK_CLASS_2_G = "2g"; public static final String NETWORK_CLASS_3_G = "3
转载自: http://blog.csdn.net/kesenhoo/article/details/7396321 Modifying your Download Patterns Based on the Connectivity Type [根据连接的网络类型来更改下载模式] 并不是所有的网络类型(Wi-Fi,3G,2G,etc)对电量的消耗是同等的.不仅仅Wi-Fi电波比无线电波消耗的电量要少很多,而且不同的无线电波(3G,2G,LTE……)也存在使用不同电量的区别. Use Wi-Fi