PhoneId returns wrong phone number

Cdymock

Member
Licensed User
Longtime User
Hi all,

I am developing an app that grabs text files via FTP, to differentiate the files for each user they are outputted with the users phone number prefixed to the file name by the DB.

Theory was I could use PhoneId to get the users phone number and then only download the files that were relevant.

However for some reason on my phone, I am getting my old phone number not the new one, I changed it a couple of weeks ago because of loads of direct sales calls.

This is the code;

Dim pId As PhoneId
Dim sPhonenum As String
sPhonenum = pId.GetLine1Number

Does anyone have any ideas why?

Cheers

Chris
 

warwound

Expert
Licensed User
Longtime User
Did you get a new SIM card with your new number or was the number changed without replacing the SIM card?

The number stored on a SIM card is not necessarily the current in use number...

On your mobile go to Settings then About phone then click the Status option in the list.

What is reported there as My phone number?

I'd guess it shows the (old) number that's stored on your SIM card.

How to add your mobile number to you phone - The giffgaff community

That link lists some mobiles that allow you to set the number stored on your SIM card.

If you don't have a mobile that can do that then there is an app on the Market that can update the SIM card: https://market.android.com/details?id=com.MyPhoneNumber&hl=en.

Martin.
 
Upvote 0

Dirk A

Member
Licensed User
Longtime User
Thanks for the info !
In your link they talk about manually adding your phone number, does anybody know how this can be done programmatically ?
 
Upvote 0
Top