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
Highlighted
New Developer
Posts: 37
Registered: ‎07-13-2014
My Device: Z10
My Carrier: Vodafone

Merge Contacts from File to Contacts in Phone

Hi All,

 

I am parsing contacts file from which i am retrieving list of COntacts as form of QList<Contact>

 

Now i wish to merge them with contacts already present in phone.

 

I can't find any method in ContactService API

 

https://developer.blackberry.com/native/reference/cascades/bb__pim__contacts__contactservice.html

 

Please suggest

 

Thanks & Regards,

Developer
Posts: 161
Registered: ‎01-03-2013
My Device: n/a
My Carrier: n/a

Re: Merge Contacts from File to Contacts in Phone

Here you are:

 

https://developer.blackberry.com/native/reference/cascades/bb__pim__contacts__contactservice.html#fu...

Regards.

If my answer has been useful to you, please, click the button
New Developer
Posts: 37
Registered: ‎07-13-2014
My Device: Z10
My Carrier: Vodafone

Re: Merge Contacts from File to Contacts in Phone

As given in the link method 

Contact createContact (

  • const Contact &contact
  • boolisWork )

takes in argument as Contact and as given in the specification we need to create Contact using ContactBuilder.

 

However in my application i am already getting contact by method  contactFromVCard so do i need to use the ContactBuilder api or simply using the contact i have as an argument wil suffice.

 

Thanks 

Developer
Posts: 161
Registered: ‎01-03-2013
My Device: n/a
My Carrier: n/a

Re: Merge Contacts from File to Contacts in Phone

You don't have to use ContactBuilder, use directly createContact with the contact returned by contactFromVCard.

Regards.

If my answer has been useful to you, please, click the button