Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between NetworkInfo.isRoaming() and TelephonyManager.isNetworkRoaming()

I'm trying to detect wether the device is roaming or not in my app and I've found these two methods:

  • NetworkInfo.isRoaming()
  • TelephonyManager.isNetworkRoaming()

Is there an essential difference between them or can I just choose one?

like image 828
Romain Piel Avatar asked Aug 30 '11 14:08

Romain Piel


1 Answers

I think TelephonyManager.isNetworkRoaming()is 2G-related, whether NetworkInfo.isRoaming() is 3G-related - setting data-roaming on/off is a distinct option in the android-settings, so if it's off you still may get truefor GSM (TelephonyManager.isNetworkRoaming())

like image 148
DonGru Avatar answered Nov 19 '22 11:11

DonGru