/** * Check if there is fast connectivity * @param context * @return */ public static bool IsConnectedFast(Context context) { NetworkInfo info = NetworkConnectivity.GetNetworkInfo(context); TelephonyManager tm = TelephonyManager.FromContext(context); return(info != null && info.IsConnected && NetworkConnectivity.IsConnectionFast(info.Type, tm.NetworkType)); }
/** * Check if there is any connectivity to a mobile network * @param context * // @param type * @return */ public static bool IsConnectedMobile(Context context) { NetworkInfo info = NetworkConnectivity.GetNetworkInfo(context); return(info != null && info.IsConnected && info.Type == ConnectivityType.Mobile); }
/** * Check if there is any connectivity * @param context * @return */ public static bool IsConnected(Context context) { NetworkInfo info = NetworkConnectivity.GetNetworkInfo(context); return(info != null && info.IsConnected); }