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
New Contributor
Posts: 6
Registered: ‎11-11-2009
My Device: Not Specified

Re: Retrieve Name from Phone Number

[ Edited ]

That's great!! This is much, much faster than the Addressbook lookup and it handles the phone number formatting issues.With over 4800 contacts in the Addressbook, using the PIM API and a template to optimize the search was talking over 45000 ms seconds on a Bold 9000. Using the PhoneCallLogID takes 6 ms.

 

Thank-you for sharing that!

Developer
Developer
Posts: 266
Registered: ‎04-01-2009
My Device: Not Specified

Re: Retrieve Name from Phone Number

but when it is not a perfect match of the numbers, lets say the address book stores it as 0234 and the incoming call is from +1234 then it does not match, right?

Developer
Posts: 1,635
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Retrieve Name from Phone Number

but this only works if the entry is in the calllogs.  say if i delete the call log this api will not return the name correct?

New Contributor
Posts: 6
Registered: ‎11-11-2009
My Device: Not Specified

Re: Retrieve Name from Phone Number

This checks the Addressbook - I don't even think it looks at the call logs or cares what you do with them. Basically is the Blackberry can identify the incoming number and displays the matching contact entry name on the incoming phone display, then this will work. It appears to handle incoming + and country codes correctly.

New Contributor
Posts: 3
Registered: ‎10-31-2011
My Device: Strorm 9530
My Carrier: t-mobile ex Verizon

Re: Retrieve Name from Phone Number

Superb! I've sifted through reams of useless code over the last week just trying to retreive the stored caller name from the address book on an incoming call,  and you come up with this one line perfect solution. Top man!!!! Thanks for what you wrote 3 years ago.