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

Web and WebWorks Development

Reply
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Need help to get images from contact.

I am working on the web application. I need to get contact information for my application. Currently I am using following API to get the contact
https://developer.blackberry.com/html5/apis/blackberry.pim.contacts.html#.find
I have also got the code from ‘pimcontacts’ example of ‘BB10-WebWorks-Community-Samples’. I have the following doubts
1.    Can I get list of contactFields attributes.  What are the values I can give to make this arre. Currently  I am using

contactFields = ['name', 'nickname'];

But I need other details also. Like photo, company name etc.
 
2.    I am using following find options
findOptions.filter = [{fieldName: blackberry.pim.contacts.ContactFindOptions.SEARCH_FIELD_PHONE, fieldValue: '11111111111'}
        ];

i.e I am getting details by the phone number.

My doubt is if this is what following line return if it is unable to find any thing in the contact list
blackberry.pim.contacts.find(contactFields, findOptions, onFindSuccess, onFindError);

3.    Can we give array of phone numbers as an  input

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Trusted Contributor
lathajagan
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10

Re: Need help to get images from contact.

hi, let me know how did u solve the problem

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Need help to get images from contact.

I have done this by introduction of

 

contactFields = ['name', 'nickname','photos'];

 

but still want to know all the value we can give inthe contactFields.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Need help to get images from contact.

I have one more point. can we get details in bulk. currently we are sending only one phone number inside the 

findOptions.filter 

 

Can we send multiple phone numbers.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.