public boolean check_Internet(Context mContext)
{
ConnectivityManager mConnectivityManager =
(ConnectivityManager) mContext
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager
.getActiveNetworkInfo();
if (mNetworkInfo != null && mNetworkInfo.isConnectedOrConnecting())
return true;
else
return false;
}
{
ConnectivityManager mConnectivityManager =
(ConnectivityManager) mContext
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager
.getActiveNetworkInfo();
if (mNetworkInfo != null && mNetworkInfo.isConnectedOrConnecting())
return true;
else
return false;
}
No comments:
Post a Comment