The Application instance contains the information and authentication credentials needed to register and connect to the Sybase Unwired Platform server.
// Initialize Application settings
Application app = Application.getInstance();
// The identifier has to match the application ID deployed to the SUP server
app.setApplicationIdentifier("SUP101");
// Set the android.content.Context for the application
app.setApplicationContext(context); // context is the android.content.Context
// ConnectionProperties has the infomation needed to register
// and connect to SUP server
ConnectionProperties connProps = app.getConnectionProperties();
connProps.setServerName("supserver.mycompany.com");
connProps.setPortNumber(5001);
// Other connection properties need to be set when connecting through relay server
// provide user credentials
LoginCredentials loginCred = new LoginCredentials("supAdmin", "supPwd");
connProps.setLoginCredentials(loginCred);
// Initialize generated package database class with this Application instance
SUP101DB.setApplication(app);