Пример #1
0
 public static boolean isConnectedMobile(Context context) {
   NetworkInfo info = ConnectionChecker.getNetworkInfo(context);
   return (info != null
       && info.isConnected()
       && info.getType() == ConnectivityManager.TYPE_MOBILE);
 }
Пример #2
0
 public static boolean isConnectedFast(Context context) {
   NetworkInfo info = ConnectionChecker.getNetworkInfo(context);
   return (info != null
       && info.isConnected()
       && ConnectionChecker.isConnectionFast(info.getType(), info.getSubtype()));
 }
Пример #3
0
 public static boolean isConnected(Context context) {
   NetworkInfo info = ConnectionChecker.getNetworkInfo(context);
   return (info != null && info.isConnected());
 }