-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm trying to fetch the telephone number of the device. I'm calling TelephonyManager.getLine1Number(), and it's returning null.
A trawl of the intertubes shows that there's a potential problem with some SIMs not containing this information; however, Settings->About Phone->Status *does* show the correct phone number, so this isn't it. Looking at the code, it appears that Settings isn't using TelephonyManager to retrieve the phone number. Instead it's using com.android.internal.telephony.Phone, an internal API, to do this; so obviously this is working, where TelephonyManager is not. Can anyone shed any light on this, and hopefully suggest how I can correctly fetch the phone number? - -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvYN9wACgkQf9E0noFvlzg6WwCgmyZDbGV1IqqnIUTUBxjtgmUZ YL8An2mrVxtNy+i8kjeFniytTIY8UYvP =6p5u -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en