I have used Following Code For Wheather Intenet conection is available or not, its works fine upto 3G systems. but Its not working for 4G technology. Anybody have idea about How find Internet connection is Avlable or not on 4g? if any body have democode for it, please provide it
Code:
public static boolean checkConnection(Context c)
{
ConnectivityManager mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE);
TelephonyManager telephonyManager = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
if(mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected() || telephonyManager.getDataState() == TelephonyManager.DATA_CONNECTED)
return true;
else
return false;
}
Thanks in Advance Nirav modh