getRegistrationStatus

Retrieves the current status of the mobile application registration.

Syntax

public int getRegistrationStatus()

Returns

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;
}

Examples

  • Get the Registration Status – Registers the application if it is not already registered.
    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();
    }