How to know whether Roaming Data is Enabled/Disabled? In the code i need to know whether Data Roaming is enabled. I can check whether phone is roaming via TelephonyManager. But how to know if Data Roaming is enabled?
Asked
Active
Viewed 2,193 times
1 Answers
0
NetworkInfo info = (NetworkInfo) ((ConnectivityManager) ctx
.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
if(info.isRoaming)
{
S.O.P("data roaming");
}

Kamal
- 1,415
- 13
- 24
-
This actually returns true even if data roaming is turned off. Further more this approach might return the WIFI NetworkInfo object if the user is connected to a WiFi network at that time. – Jan 26 '12 at 08:56
-
1this tells you if you are currently roaming, not if roaming is enabled. – Jeffrey Blattman Feb 14 '12 at 23:43
-
@jaffery: yes this tells you if you are currently in Roaming. But you can use another condition for data is enabled or not. Its easy & a developer can think it itself. – Kamal May 29 '12 at 12:42