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