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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 96
Registered: ‎07-26-2008
My Device: Not Specified

Detecting end of bulk contact book syncing event

[ Edited ]


We have an application that adds contacts from the native contact book to our application contact list for sharing actions etc.


When the application first launches it does a bulk sync with the native device contact list.   Thereafter it adds a PIM listener to track any changes to native contact list and acts on it immediately inside our application.


There are cases however when a user subsequently adds a new email account, say gmail , and enables synchronization of contacts. Immediately  thousands of events may be fired for new contact adds depending on how many entries the gmail account had.   As our application is written to act on each event as it occurs, it kills the performance of the app and device as each of the contact added event requires some processing and a network hit on our side.  1000's of these hits back to back occur and this is not desirable.


How do people handled these kinds of scenarious?


We would like to batch up all these requests and handle then once - however for this we would need to detect when the end of the synchronization process has occurred.


We looked for a new contact list/group added event, so we are able to detect the begining of this process.  However, there is no reliable way to detect the end of the contact book synchronizing event.


We found the following API that purports to do this, however we have not been able to use it to fire the requisite events and it is is not clear that if this  OTA event is fired for the case of email address based contact book synchronization that occurs with gmail etc or if it is for something else.




Does anyone have any sample code that can show us how to handle the begin and end of a bulk contact book synchrnonization process ?


Other approaches, work around to handle this situation will be appreciated.


Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Detecting end of bulk contact book syncing event

afaik the SyncEvents are something else, monitoring OTA sync of data stored in http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/synchronization/OTASyncCapable...


i don't think there is an API for what you want. Maybe you could queue events and check for the timestamp, if there don't come any new ones for a certain time you process them.

Quite a complicated solution with lots of overhead, though.

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter