Migrating BlackBerry Applications to 2.1 ESD #2

These changes are required to migrate BlackBerry applications to 2.1 ESD #2.

Update your application:

  1. The Application APIs (in the Application class) are required for managing application registrations, connections, and context. Rewrite the initialization code in your application to use the Application APIs.

    For information on the Application interface, search for Application APIs in the Developer Guide for your platform.

  2. Callbacks related to application events are contained in a separate ApplicationCallback interface. Rewrite your application code to use this interface.

    For information on the ApplicationCallback interface, search for Callback and Listener APIs in the Developer Guide for your platform.

  3. Replication-based synchronization clients require two data channels: a data channel for data synchronization, and a messaging channel for sending registration and push notifications to the client. Update your port configuration for both channels. See Sybase Control Center for Sybase Unwired Platform > Administer > Unwired Server > Server Properties.
  4. To continue using server-initiated synchronization, you must write code for handling notifications. If change notifications are enabled for synchronization groups, you can implement the onSynchronize callback method to monitor this condition, and either allow or disallow default background synchronization.
    public int onSynchronize(ObjectList 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;
    }
  5. Rebuild your application as described in Migrating BlackBerry Applications (Eclipse Project) or Migrating BlackBerry Applications (JDE Project).