Class AuthTask


  • public class AuthTask
    extends AsyncTask<Account,​Void,​CloverAuth.AuthResult>
    Authenticates with the Clover service in the background. Subclasses can override callback methods in order to respond to success or failure.
    • Constructor Detail

      • AuthTask

        public AuthTask​(Activity activity)
        Create a new AuthTask.
        Parameters:
        activity - the Activity that initiated authentication with the Clover service.
    • Method Detail

      • getException

        public Exception getException()
        Return the Exception that was thrown when authentication failed, or null if authentication succeeded.
      • getErrorMessage

        public String getErrorMessage()
        Return the error message that was generated when authentication failed, or null if authentication succeeded.
      • onAuthComplete

        protected void onAuthComplete​(boolean success,
                                      CloverAuth.AuthResult result)
        Called on the main thread after the auth process has completed.
        Parameters:
        success - true if authentication was successful
        result - the authentication result, or null if an exception was thrown
      • onIOException

        protected void onIOException​(IOException e)
        Called on the main thread if IOException was thrown during authentication.