Clients receive device notifications when a data change is detected for any of the MBOs in the synchronization group to which they are subscribed.
SynchronizationGroup sg = SMP101DB.getSynchronizationGroup("TCNEnabled"); if (!sg.getEnableSIS()) { sg.setEnableSIS(true); sg.setInterval(2); // 2 minutes sg.save(); SMP101DB.synchronize("TCNEnabled"); }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 SAP Control Center for SAP Mobile Platform.
public int onSynchronize(GenericList<SynchronizationGroup> groups, SynchronizationContext context) { int status = context.getStatus(); 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; }