Push Synchronization Applications

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:
ISynchronizationGroup sg = MyPackageDB.getSynchronizationGroup("TCNEnabled");

if (!sg.EnableSIS)
{
  sg.setEnableSIS(true);
  sg.setInterval(2);
  sg.save();
  MyPackageDB.synchronize("TCNEnabled");
}
When the server detects changes in an MBO affecting a client device, and the synchronization group of the MBO has the change detection enabled, the server will send a notification to client device through messaging channel. When the server detects changes in an MBO affecting a client device, and the synchronization group of the MBO has the change detection enabled, the server will send a notification to client device through messaging channel. By default, a background synchronization downloads the changes for that synchronization group. The application can implement the onSynchronize callback method to monitor this condition, and either allow or disallow background synchronization.
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;
}