I am creating an app with network operations. Here I am handling offline and slow network cases to handle the operations. But when I tried through a mobile network with no data balance is available, it always returns as connected status with the below code.
NetworkInfo info =Connectivity.getNetworkInfo(context);
if(info.getState() == NetworkInfo.State.CONNECTED)
{
Log.d("Connected","Connected..");
return true;
}
And by checking the strength for the same connection, it returns true for the below case as well :
case TelephonyManager.NETWORK_TYPE_LTE: // API level 11
return true; // ~ 10+ Mbps
Anyone, please help me to block the user as offline for the above scenario. Thanks In Advance.