Exemplo n.º 1
0
        /**
         * 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));
        }
Exemplo n.º 2
0
        /**
         * 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);
        }
Exemplo n.º 3
0
        /**
         * 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);
        }
 public bool IsConnectedFast()
 {
     return(NetworkConnectivity.IsConnectedFast(context));
 }