Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getLine1Number return null but not always [duplicate]

I use the TelephonyManager to get the phone number, in the SDK all works perfectly, on some devices like my hero with 1.5 it returns null, on the tattoo with 1.6 it works but on some other tattoos it returns null.
Is there any other way to get the phone number?

like image 365
bob Avatar asked Jan 18 '26 08:01

bob


1 Answers

As far as I know, the phone number returned is whatever is stored on the SIM card's MSISDN, which isn't filled by some operators. (Worse still, according to some reports, the number might actually be incorrect!)

Unfortunately, I don't know of any other method, either.

like image 99
mernen Avatar answered Jan 20 '26 22:01

mernen