Clients receive device notifications when a data change is detected for any of the MBOs in the synchronization group to which they are subscribed.
Sybase Unwired Platform uses a messaging channel to send change notifications from the server to the client device. By default, change notification is disabled. You can enable the change notification of a synchronization group: If you see that setInterval is set to 0, then change detection is disabled, and notifications will not be delivered. Enable change detection and notification delivery by setting an appropriate value. For recommendations, see Configuring Synchronization Groups in Sybase Control Center for Sybase Unwired Platform.
ISynchronizationGroup sg = SUP101DB.GetSynchronizationGroup("TCNEnabled"); if (!sg.EnableSIS) { sg.EnableSIS = true; sg.Interval = 2; sg.Save(); SUP101DB.Synchronize("TCNEnabled"); }
public int OnSynchronize(GenericList<ISynchronizationGroup> groups, SynchronizationContext context) { int status = context.Status; if (status == SynchronizationStatus.STARTING_ON_NOTIFICATION) { // There is changes on the synchronization group if (busy) { return SynchronizationAction.CANCEL; } else { return SynchronizationAction.CONTINUE; } } // return CONTINUE for all other status return SynchronizationAction.CONTINUE; }