Subsequently Starting an Application

Subsequent start-ups are different from the first start-up.

Starting an application on subsequent occasions:
  1. Set up the com.sybase.mobile.Application instance with the required com.sybase.mobile.ConnectionProperties, including user credentials.
  2. Set up the connection profile properties if needed for database location and tuning parameters.
  3. Set up the synchronization profile properties if needed for SSL or a relay server.
  4. Start the application connection to the server.
  5. Open the database connection.

You can open the database connection in parallel with starting the application connection to the server.

// Calls non-blocking startConnection
// This call will return immediately.
application.startConnection();

// Open the device database connection while establishing
// the messaging channel connection in the background
SUP101DB.openConnection();

// Once the device database connection has been opened, check
// whether the messaging channel is connected using the
// ApplicationCallback interface or the Application.getConnectionStatus() API
Related reference
Application APIs