2

So on an Android device, one can navigate to Settings > About Phone > Status and find the device's phone number.

Where is this information stored in the Android databases for, say, an SDK emulated device? I know I can use the telephony manager, but I'd like to know where to find it using SQLite.

I realize I can find it programatically, but is there any way to do it with just SQLite?

I'm fairly new to Android, so forgive me if this is a bad question. It seems like the device phone number should be stored somewhere sensible, but at this point I'm not terribly optimistic.

P.S. Please notice, I am not asking how to retreive it (which is duplicate with other questions). I am asking, where it's actually stored.

1 Answers1

0

The platform settings app uses the same TelephonyManager.getLine1Number() call as mentioned in the linked question:

String rawNumber = mPhone.getLine1Number();  // may be null or empty
String formattedNumber = null;
if (!TextUtils.isEmpty(rawNumber)) {
    formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
}
// If formattedNumber is null or empty, it'll display as "Unknown".
setSummaryText(KEY_PHONE_NUMBER, formattedNumber);

(From src/com/android/settings/deviceinfo/Status.java)

Community
  • 1
  • 1
laalto
  • 150,114
  • 66
  • 286
  • 303