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: 7
Registered: ‎08-27-2008
My Device: Curve - 8330
Accepted Solution

How to register OTASyncListener?

I'm writing an application that integrates with the BB addressbook and calendar. The app includes PIMListListener for contacts and calendar events. I'm interested in knowing from within the PIMListListener.itemAdded, PIMListListener.itemUpdated, and PIMListListener.itemRemoved methods whether the changes were triggered by synchronization with our BES, or not. I assume that I can use OTASyncListener trap BES-initiated syncs. My problem is I cannot figure out from the javadocs how to register the OTASyncListener.


On a releated note, it would be fantastic if the API docs could include a snippet of code, or failing that, some prose explaining how to register this listener. Or if registration isn't necessary, say so. In my experience, the javadocs often only explain in the shortest terms possible what one would have inferred from the class, method, and parameter names themselves.


I grepped the javadocs hoping to find the class that allows me to register OTASyncListener. This only yielded the OTASyncListener class documentation itself, and the several links to it. Same with google. I've searched this and other forums and haven't come up with anything. It's exasperating.

BlackBerry Development Advisor
Posts: 15,884
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to register OTASyncListener?

The OTASynListener is used when creating your own synchronization implementation.  Meaning you are synchronizing your own data through the BlackBerry Enterprise Server's Synchronization Service to a custom connector plugged into this service that sites between the BlackBerry Enterprise Server and your data. 


It is not fired when any synchronization event occurs with the BlackBerry Enterprise Server.


There isn't a listener that provides exactly what you are looking for.  The PIMListener2 interface may give you some information when a batch of updates are occurring.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 7
Registered: ‎08-27-2008
My Device: Curve - 8330

Re: How to register OTASyncListener?

Thanks for clarifying this for me, Mark.