AppInteractionDeniedException


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.

Summary

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.

AppInteractionDeniedException(String message, int reason, Bundle extras)

Constructor for AppInteractionDeniedException.

Public methods

int getReason()

Returns the reason for interaction denied.

Inherited methods

Constants

REASON_AUTO_DENIED

Added in version 37.2
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)

REASON_UNKNOWN

Added in version 37.2
public static final int REASON_UNKNOWN

Unknown reason for denied.

Constant Value: 0 (0x00000000)

REASON_USER_DENIED

Added in version 37.2
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 constructors

AppInteractionDeniedException

Added in version 37.2
public AppInteractionDeniedException (String message, 
                int reason)

Constructor for AppInteractionDeniedException.

Parameters
message String: The error message.
This value may be null.

reason int: The reason for interaction denied.
Value is one of the following:

AppInteractionDeniedException

Added in version 37.2
public AppInteractionDeniedException (String message, 
                int reason, 
                Bundle extras)

Constructor for AppInteractionDeniedException.

Parameters
message String: The error message.
This value may be null.

reason int: The reason for interaction denied.
Value is one of the following:
extras Bundle: Additional metadata.
This value cannot be null.

Public methods

getReason

Added in version 37.2
public int getReason ()

Returns the reason for interaction denied.

Returns
int The reason for interaction denied.
Value is one of the following: