04-12-2009 09:21 AM
Solved! Go to Solution.
04-13-2009 12:46 AM
Thanks for the reply Rex.
I'm working on simulator and Phone.getDevicePhoneNumber(true) returns 1 519 888 7846
I guess it should be a Random number as its a just a simulator response.
i'm curious to know from where this number is coming from. does the phone number is getting stored anywhere with in the device?
04-13-2009 12:57 AM
Each simulator has its associated sample phone number, pin number etc.,
If you test with actual bb device, it will respond you with the actual phone number.
04-13-2009 02:01 AM
Sorry for entering this thread .. As far as I know, there is no API in blackberry to get the phone number from SIM.. Phone.getDevicePhoneNumber() only get you the phone number, if the user explicitly set his number on phone..
04-13-2009 02:07 AM
It'll return null if phone number is not set.. Simulators are preset with some needed numbers for the ease of use of the developers.. Like baskaran said!
04-13-2009 02:14 AM
However there is a way to get the International Mobile Subscriber Identity(IMSI) using SIMCardInfo.getIMSI().. If you are working on security, this might help.. Else, leave it..