GetCredentialException
open class GetCredentialException : Exception
| kotlin.Any | |||
| ↳ | kotlin.Throwable | ||
| ↳ | java.lang.Exception | ||
| ↳ | android.credentials.GetCredentialException | ||
Represents an error encountered during the CredentialManager.getCredential(Context, GetCredentialRequest, operation.
Summary
| Constants | |
|---|---|
| static String | 
            
             The error type value for when the given operation failed due to internal interruption.  | 
        
| static String | 
            
             The error type value for when no credential is found available for the given   | 
        
| static String | 
            
             The error type value for when the given operation failed due to an unknown reason.  | 
        
| static String | 
            
             The error type value for when the user intentionally cancelled the request.  | 
        
| Public constructors | |
|---|---|
            GetCredentialException(type: String)Constructs a   | 
        |
            GetCredentialException(type: String, message: String?)Constructs a   | 
        |
            GetCredentialException(type: String, message: String?, cause: Throwable?)Constructs a   | 
        |
            GetCredentialException(type: String, cause: Throwable?)Constructs a   | 
        |
| Public methods | |
|---|---|
| open String | 
            getType()Returns the specific exception type.  | 
        
Constants
TYPE_INTERRUPTED
static val TYPE_INTERRUPTED: String
The error type value for when the given operation failed due to internal interruption. Retrying the same operation should fix the error.
Value: "android.credentials.GetCredentialException.TYPE_INTERRUPTED"TYPE_NO_CREDENTIAL
static val TYPE_NO_CREDENTIAL: String
The error type value for when no credential is found available for the given android.credentials.CredentialManager#getCredential(android.content.Context,android.credentials.GetCredentialRequest,android.os.CancellationSignal,java.util.concurrent.Executor,android.os.OutcomeReceiver) request.
Value: "android.credentials.GetCredentialException.TYPE_NO_CREDENTIAL"TYPE_UNKNOWN
static val TYPE_UNKNOWN: String
The error type value for when the given operation failed due to an unknown reason.
Value: "android.credentials.GetCredentialException.TYPE_UNKNOWN"TYPE_USER_CANCELED
static val TYPE_USER_CANCELED: String
The error type value for when the user intentionally cancelled the request.
This is a strong indicator that your app should refrain from making the same api call for a certain amount of time to provide a better user experience.
Value: "android.credentials.GetCredentialException.TYPE_USER_CANCELED"Public constructors
GetCredentialException
GetCredentialException(type: String)
Constructs a GetCredentialException.
| Parameters | |
|---|---|
type | 
            String: This value cannot be null. | 
          
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            If type is empty. | 
GetCredentialException
GetCredentialException(
type: String,
message: String?)
Constructs a GetCredentialException.
| Parameters | |
|---|---|
type | 
            String: This value cannot be null. | 
          
message | 
            String?: This value may be null. | 
          
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            If type is empty. | 
GetCredentialException
GetCredentialException(
type: String,
message: String?,
cause: Throwable?)
Constructs a GetCredentialException.
| Parameters | |
|---|---|
type | 
            String: This value cannot be null. | 
          
message | 
            String?: This value may be null. | 
          
cause | 
            Throwable?: This value may be null. | 
          
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            If type is empty. | 
GetCredentialException
GetCredentialException(
type: String,
cause: Throwable?)
Constructs a GetCredentialException.
| Parameters | |
|---|---|
type | 
            String: This value cannot be null. | 
          
cause | 
            Throwable?: This value may be null. | 
          
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            If type is empty. | 
Public methods
getType
open fun getType(): String
Returns the specific exception type.
| Return | |
|---|---|
String | 
            This value cannot be null. |