Developer

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:
    • API calls that can throw LogonManagerException:
      logonContext.getEndPointUrl(),
      logonContext.getEndPointUser(),
      logonContext.getEndPointPassword()
    • API calls that can throw LogonCoreExceptions:
      LogonUIFacade.getClientCertInfo(appID), 
      lgcCtx.getAppEndPointUrl(),
      lcCore.unlockStore(null), 
      logonUIFacade.getLogonCore().getLogonContext().setAppEndPointUrl(addr), 
      LogonCore.getInstance().addObjectToStore(key.getText().toString(), value.getText().toString()),
      LogonCore.getInstance().getObjectFromStore(key.getText().toString())