Esempio n. 1
0
        /**
         * Check if there is fast connectivity
         * @param context
         * @return
         */
        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));
        }
Esempio n. 2
0
        /**
         * Check if there is any connectivity to a mobile network
         * @param context
         * // @param type
         * @return
         */
        public static bool IsConnectedMobile(Context context)
        {
            NetworkInfo info = Connectivity.GetNetworkInfo(context);

            return(info != null && info.IsConnected && info.Type == ConnectivityType.Mobile);
        }
Esempio n. 3
0
        /**
         * Check if there is any connectivity
         * @param context
         * @return
         */
        public static bool IsConnected(Context context)
        {
            NetworkInfo info = Connectivity.GetNetworkInfo(context);

            return(info != null && info.IsConnected);
        }