public class NetworkUtil {
/** 网络状态未初始化。请调用init(Context)方法 */
public static final int NETWORK_UNKNOWN = -1;
/** 网络状态不可用(wifi和GPRS均未启动和连接) */
public static final int NETWORK_UNAVAILABLE = 0;
/** wifi已连接 */
public static final int NETWORK_WIFI_CONNECTED = 1;
/** wifi未启动,GPRS已连接 */
public static final int NETWORK_GPRS_CONNECTED = 2;
/** wifi已启动,但未连接任意热点 */
public static final int NETWORK_WIFI_ENABLED = 3;
/** 切换了wifi接入点 */
public static final int NETWORK_ACTION_WIFI_POINT_CHANGED = 4;
/** 启动了WiFi的情况下,转换到已连接WiFi的状态 */
public static final int NETWORK_ACTION_WIFI_ENABLED_TO_CONNECTED = 5;
/** WiFi失去了连接,但仍处于启动状态 */
public static final int NETWORK_ACTION_WIFI_CONNECTED_TO_ENABLED = 6;
public static final int NETWORK_ACTION_UNKNOWN = -1;
public static final int NETWORK_ACTION_TURN_TO_AVAILABLE = 0;
public static final int NETWORK_ACTION_TURN_TO_UNAVAILABLE = 1;
public static final int NETWORK_ACTION_GPRS_TO_WIFI = 2;
public static final int NETWORK_ACTION_WIFI_TO_GPRS = 3;