public method IO2GSessionStatus.onLoginFailed

Brief

Processes a notification about a login failure.

Declaration
Java
void  onLoginFailed (String error)

Parameters
error

The server error message.

Details

In order to process a notification about a login failure, an instance of the class implementing the IO2GSessionStatus interface must be subscribed to the session object before calling the O2GSession.login method. It is accomplished by calling the O2GSession.subscribeSessionStatus method.

Example

Processing login failure [hide]

     // Create a session, subscribe to session listener, login
     mSession = O2GTransport.createSession();
     SessionStatusListener statusListener = new SessionStatusListener(mSession, mDBName, mPin);
     mSession.subscribeSessionStatus(statusListener);
     mSession.login(mUserID, mPassword, mURL, mConnection);
     while (!statusListener.isConnected() && !statusListener.hasError()) {
          Thread.sleep(50);
     }
 
    // Implementation of IO2GSessionStatus interface public method onLoginFailed
    public final void onLoginFailed(String error) {
        System.out.println("Login error: " + error);
        mError = true;
    }

Declared in IO2GSessionStatus

back