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: 9
Registered: ‎04-29-2010
My Device: blackberry curve
My Carrier: airtel

Phone contact synchronize with my application contacts

hi blackberry world. I am a NEWBIE in this arena. Here s my problem

 

1. I have developed a sample contact application where user can add the contact details like first name and last name etc

 

2. I persist it in memory using persistance store into a memory location as list of objects,

 

 

Requirement:

 

I need to synchronize my own set of contacts to contacts already existing in the phone. HOW CAN I APPROACH THIS PROBLEM?  PLEASE HELP

Highlighted
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Phone contact synchronize with my application contacts

You can do this by reading in all of the contacts on the phone and adding them to your store, then placing a listener on the PIM database so that you are notified of changes.

 

However, I would advise against this approach. HAving two contact lsits is wastefull and prone to synchronization issues.

 

My advice (FWIW) would be to use the PIM database for *all* of the contact data, You can simply add your contacts to the BlackBerry PIM database and then you will not be doubling up on resource consumption.

 

See PIMList, PIMItem, Contact, BlackBerryContact, etc in the java docs.

 

You might find this article helpful:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800363/How_To_...