Hello guys,
I'm working on a project that I need to know whether the device is on
roaming or not. I've been digging until the very last page of Google
without success, I haven't found any sample code of how to accomplish
that.
This is the far that I could go:
ServiceState ss = new ServiceState();
Log.i(TAG, "roaming 1: " + ss.getRoaming());
Log.i(TAG, "roaming 2: " + ss.getOperatorAlphaLong());
Log.i(TAG, "roaming 3: " + ss.getOperatorAlphaShort());
Log.i(TAG, "roaming 4: " + ss.getOperatorNumeric());
Log.i(TAG, "roaming 5: " + ss.getState());
and it results:
roaming 1: false
roaming 2: null
roaming 3: null
roaming 4: null
roaming 5: 1
I have no idea what the snippet bellow is for, but I decided to add it
into my Manifest file just in case:
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /
>
Can any of you guys help me on this one?
PS: I'm testing it on my Droid, and I've got plenty of SIM Cards from
other countries and cities so that I can get the roaming status to be
on.
Regards
-gustavo
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
To unsubscribe from this group, send email to
android-beginners+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.