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

Native Development

Reply
New Developer
ApplicationUI
Posts: 4
Registered: ‎07-16-2014
My Device: Z 10

get contact name

hello

i hav a  number in QString format

i want to get its contact name if it is available in contactlist

plz help me

Developer
MagnumOpus
Posts: 158
Registered: ‎01-03-2013
My Device: n/a

Re: get contact name

Take a look at this:

 

https://developer.blackberry.com/native/documentation/cascades/device_platform/pim/contacts.html

Regards.

If my answer has been useful to you, please, click the button
Developer
anditsung
Posts: 246
Registered: ‎09-30-2010
My Device: Z10, Onyx2

Re: get contact name

ContactSearchFilters filters;
filters.setSearchValue(phoneNumber);

ContactService service;
QList<Contact> contacts = service.searchContactsByPhoneNumber(filters);

 this is how to search the number for contact

New Developer
haonguyen147
Posts: 22
Registered: ‎01-20-2014
My Device: z10

Re: get contact name

I got my answer. Thank you all!