getLine1Number return null but not always [duplicate]
Asked Answered
R

3

2

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?

Riegel answered 14/3, 2010 at 19:53 Comment(2)
In my HTC magic with cyanogenmod also returns null.Limiter
Are you using the same SIM card in your phones? Maybe try to swap them and see if this is a device problem or a SIM card problem as mernen suggests.Paymaster
S
6

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.

Stelmach answered 15/3, 2010 at 3:25 Comment(1)
Thats is the problem! Thr MSISDN is unfilled. Nothing to do. :-( Thanks all.Riegel
G
3

I searched a lot for this problem and didn't find any solution. There is a solution of reading SMS or sending SMS from some server.

Galactopoietic answered 27/7, 2010 at 13:44 Comment(0)
N
0

The solution is to put the SIM card in a dumb phone (or any Blackberry pre-2009) and the MSISDN will be set. I think with Blackberries you can manually set them.

Try dial ##000000 with the radio off and edit the first line in the menu that shows up on the Blackberry.

Neilson answered 14/11, 2014 at 14:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.