Clients receive device notifications when a data change is detected for any of the MBOs in the synchronization group to which they are subscribed.
SAP Mobile 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 SAP Control Center for SAP Mobile Platform.
id<SUPSynchronizationGroup> sg = [SMP101SMP101DB getSynchronizationGroup:@"TCNEnabled"]; if (![sg enableSIS]) { [sg setEnableSIS:YES]; [sg setInterval:2]; [sg save]; [SMP101SMP101DB synchronize:@"PushEnabled"]; }
- (SUPSynchronizationActionType)onSynchronize:(SUPObjectList *)syncGroupList withContext:(SUPSynchronizationContext *)context { switch ([context status]) { case SUPSynchronizationStatus_STARTING_ON_NOTIFICATION: if(allowBackGroundSync) { return SUPSynchronizationAction_CONTINUE; } else { return SUPSynchronizationAction_CANCEL; } break; default: return SUPSynchronizationAction_CONTINUE; // return continue for all other cases break; } }