How can i get mobile network status?
First of all I am using android studio 1.5. I want to check GSM/GPRS network coverage? how can i get phone network status?
First of all you'll need these permissions
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
then after that where you want to check the Network status you should use this:
boolean isOnline= isNetworkStatusAvialable (getApplicationContext());
this will return if the mobile has Network available or not. hope this is all you need!
and just to let you know it is already answered on stackoverflow. you should really check if the question is there already or not!