08-27-2008 10:18 AM
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.
Solved! Go to Solution.
08-27-2008 11:40 AM
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.