Clients receive device notifications when a data change is detected for any of the MBOs in the synchronization group to which they are subscribed.
ISynchronizationGroup sg = MyPackageDB.getSynchronizationGroup("TCNEnabled");
if (!sg.EnableSIS)
{
sg.setEnableSIS(true);
sg.setInterval(2);
sg.save();
MyPackageDB.synchronize("TCNEnabled");
}
public int OnSynchronize(GenericList<ISynchronizationGroup> 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;
}