04-29-2010 01:10 PM
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,
I need to synchronize my own set of contacts to contacts already existing in the phone. HOW CAN I APPROACH THIS PROBLEM? PLEASE HELP
04-29-2010 01:22 PM
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: