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

Java Development

Reply
Developer
bill_zj
Posts: 49
Registered: ‎10-09-2008
My Device: Not Specified

How to identify "unknown number" and "Private number"?

My apps want to capture "unknown number" and "Private number", but 

PhoenCallLog.getParticipant().getNumber() returns "" for both type of calls,

how can I seprate them?

 

thanks,

Please use plain text.
Regular Contributor
spardhan
Posts: 64
Registered: ‎01-27-2011
My Device: Not Specified

Re: How to identify "unknown number" and "Private number"?

PhoneCall.getDisplayPhoneNumber will get you what you want. In order to get the PhoneCall object you could call Phone.getActiveCall() to give you the currently active incoming call.

 

If you have the PhoneListener interface implemented then you will have access to the callid and you could use Phone.getCall(int callId) to get the PhoneCall object

Please use plain text.
Developer
bill_zj
Posts: 49
Registered: ‎10-09-2008
My Device: Not Specified

Re: How to identify "unknown number" and "Private number"?

thanks spardhan,

 

 

 

I'm using PhoneLogListener to capture all missed phone calls.

 

 

 

is there a way retrive "Private number" info only use this listern?

 

 

 

Normally, we can see date, Phone# or "unknown number" or "Private number" when we view call log on a BB device, I wanto to get the same info in my apps.

 

 

so far, I have phonecalllog.getParticipant().getNumber() /getName(), / getDate()

but just could not figurate out how to get "Private number"

thanks,

Please use plain text.
Regular Contributor
spardhan
Posts: 64
Registered: ‎01-27-2011
My Device: Not Specified

Re: How to identify "unknown number" and "Private number"?

Have you tried getAddressBookFormattedNumber from PhoneCallLogID?

Please use plain text.
Developer
bill_zj
Posts: 49
Registered: ‎10-09-2008
My Device: Not Specified

Re: How to identify "unknown number" and "Private number"?

just tried "getAddressBookFormattedNumber from PhoneCallLogID"

 

it returns a phone# if the phone# is presented

 

otherwise it returns null for both "unknown number" and "Private number"

 

as you mentioned I may have to use phonelistener.

 

thanks again.

Please use plain text.