VodaFone Phone number problem?

Penfound

Active Member
Licensed User
Longtime User
Hi guys

A friend of mine trying out one of my apps phoned to say he was getting an error and couldn't see stuff he was supposed.

Access to the hidden area is gained by reading the device phone number. He has exactly the same phone as me, a Galaxy I9000 only difference is he is on Vodafone. Needless t osay mine works and his doesn't.

Checking the settings on his phone we discovered that his phone number is unknown does anyone know how to change this please?:sign0085:
 

warwound

Expert
Licensed User
Longtime User
A lot of SIM cards are provided with no pre-defined phone number - there is no phone number stored on the SIM card.

So you register the SIM card and get a dynamically generated phone number but your SIM card does not know the phone number that you have been assigned and as you have found - your application gets no phone number from the device.

There's no way around that - as long as your B4A code tries to get a phone number from the SIM card it will fail.

You can get an app such as My Phone Number to manually update a SIM card with a phone number.

And with some (custom) ROMs there is a built in way to set the phone number stored on the SIM card.

My ZTE Blade running CyanogenMod7 can set the SIM card phone number via it's Settings > About > Status menu if no number is currently stored on the SIM card.

There's some (other) Android applications that require to read a phone number from the SIM card and will fail if the SIM card has no phone number stored.

I don't think there is a workaround.

Martin.
 
Upvote 0
Top