获取网络类型 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
在类中使用getSystemService的时候需要这样进行使用:1. public class JajaMenu extends Activity { public static JajaMenu instance; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); instance=this; } //获取实例 public