Retrieves the current status of the mobile application registration.
public int getRegistrationStatus()
getRegistrationStatus returns one of the values defined in the RegistrationStatus class.
public class RegistrationStatus { public static final int REGISTERED = 203; public static final int REGISTERING = 202; public static final int REGISTRATION_ERROR = 201; public static final int UNREGISTERED = 205; public static final int UNREGISTERING = 204; }
if (app.getRegistrationStatus() == RegistrationStatus.UNREGISTERED) { // If the application has not been registered to the server, // register now app.registerApplication(); } else { // start the connection to server app.startConnection(); }