标签:tac log sys ems div gets pre context code
1 public static boolean isConnect(Context context) { 2 ConnectivityManager connectionManager = (ConnectivityManager) context 3 .getSystemService(Context.CONNECTIVITY_SERVICE); 4 if (connectionManager != null) { 5 NetworkInfo info = connectionManager.getActiveNetworkInfo(); 6 if (info != null && info.isConnected()) { 7 if (info.getState() == NetworkInfo.State.CONNECTED) { 8 return true; 9 } 10 } 11 } 12 return false; 13 }
标签:tac log sys ems div gets pre context code
原文地址:http://www.cnblogs.com/mrszhou/p/6863576.html