Each device must register with the server before establishing a connection.
To register the device with the server during the initial application startup, use the registerApplication method in the com.sybase.mobile.Application class. You do not need to use the registerApplication method for subsequent application startups.To start the connection to complete the registration process, use the Application.startConnection method.
Call the generated database's setApplication method before starting the connection or registering the device.
// Initialize Application settings Application app = Application.getInstance(); // The identifier has to match the // application ID deployed to the SUP server app.setApplicationIdentifier("SUP101"); ApplicationCallback appCallback = new ApplicationCallback(); app.setApplicationCallback(appCallback); // set connection properties, login credentials, etc ... SUP101DB.setApplication(app); if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) { // If the application has not been registered to the server, // register now app.registerApplication(<timeout_value>); } else { // start the connection to server app.startConnection(<timeout_value>); }