public
class
AppInteractionDeniedException
extends AppInteractionException
| java.lang.Object | ||||
| ↳ | java.lang.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | android.app.AppInteractionException | |||
| ↳ | android.app.AppInteractionDeniedException | |||
Exception thrown when an app interaction is denied.
Constants | |
|---|---|
int |
REASON_AUTO_DENIED
Auto denied the interaction. |
int |
REASON_UNKNOWN
Unknown reason for denied. |
int |
REASON_USER_DENIED
User denied the interaction. |
Public constructors | |
|---|---|
AppInteractionDeniedException(String message, int reason)
Constructor for |
|
AppInteractionDeniedException(String message, int reason, Bundle extras)
Constructor for |
|
Public methods | |
|---|---|
int
|
getReason()
Returns the reason for interaction denied. |
Inherited methods | |
|---|---|
public static final int REASON_AUTO_DENIED
Auto denied the interaction.
This means that the user was not shown a dialog and the interaction was denied by the system automatically. This could happen because the user has previously denied the interaction already.
Constant Value: 2 (0x00000002)
public static final int REASON_UNKNOWN
Unknown reason for denied.
Constant Value: 0 (0x00000000)
public static final int REASON_USER_DENIED
User denied the interaction.
This means that the user was shown a dialog and explicitly denied the access.
Constant Value: 1 (0x00000001)
public AppInteractionDeniedException (String message,
int reason)Constructor for AppInteractionDeniedException.
messageString: The error message.
null.reasonint: The reason for interaction denied.
public AppInteractionDeniedException (String message,
int reason,
Bundle extras)Constructor for AppInteractionDeniedException.
messageString: The error message.
null.reasonint: The reason for interaction denied.
extrasBundle: Additional metadata.
null.public int getReason ()
Returns the reason for interaction denied.
intContent and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-28 UTC.