Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® OS Smartphones

Reply
New Developer
Posts: 8
Registered: ‎07-10-2008
My Device: Not Specified

How can Retrieve phone number on Blackeberry CDMA device?

HI All,

 

I am tring to retrieve phone number on Blackeberry CDMA device using Blackberry APIs Phone.getDevicePhoneNumber(false); but is is not working it is returning null string value.

 

Also I can't send SMS using BB API (for CDMA Device)

 

Can you please tell me what i do for retrieving phone number using my application.

 

Thanks in Advance.

Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: How can Retrieve phone number on Blackeberry CDMA device?

Some devices do not have a phone number stored on the SIM-Card.

You can go to: Options -> Advanced Options -> Sim-Card -> Scroll Down -> MenuButton -> Edit SIM-Phonenumber

and enter/edit the number there if it is not present.

 

Then Phone.getDevicePhoneNumber(boolean) will work. 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
New Developer
Posts: 8
Registered: ‎07-10-2008
My Device: Not Specified

Re: How can Retrieve phone number on Blackeberry CDMA device?

Hi,

Thanks for reply, I am trying my application on T-mobile 8820. Your solution is good and it is working, But this solution requires manually enter phone number in Options -> Advanced Options -> Sim-Card -> Scroll Down -> MenuButton -> Edit SIM-Phonenumber.

 

Actully we don't want that user do these thing.

 

I tried to get phone number via sending sms to short code that returns phone number, But for CDMA there is problem for sending sms by using BB API (invoke method), Because this API restart the application.

 

Is there any other way to get phone number?

 

Please reply.

 

Thanks in Advance.

 

 

Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: How can Retrieve phone number on Blackeberry CDMA device?

You cannot get a phonenumber if it is not saved on the SIM Card.  You have to make sure that the number is saved on the card. Some carriers do that, some don't.

Isn't the 8820 a GSM device? 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
Contributor
Posts: 36
Registered: ‎06-02-2008
My Device: Not Specified

Re: How can Retrieve phone number on Blackeberry CDMA device?

CDMA devices don't have SIM cards so that isn't the reason.

 

Is your app signed by RIM?  That may be the issue.