Error Handling

You can handle errors of MAF logon operations in two ways.

  • Through localized error messages that are received when the LogonListener callback happens:
    @Override
    	public void onLogonFinished(String error, boolean isUserRegistered, LogonContext context) {
    		Log.i(LOG_TAG, "onLogonFinished:[error]=" + error 
    				+ " [isUserRegistered]="+ isUserRegistered 
    				+ " [context]="+context);
    		//makes hides MAFLogonUI when logon finished
    		finish();
    	}
  • Through standard Java exceptions:
    /**
    	 * Application logic with logout button.
    	 * 
    	 * @param logonContext
    	 * @throws LogonManagerException
    	 */
    	private void doApplicationLogic() throws LogonCoreException {...}