UriCustomizationAction


class UriCustomizationAction : CustomizationAction
kotlin.Any
   ↳ android.hardware.input.CustomizationAction
   ↳ android.hardware.input.UriCustomizationAction

Represents an action that requires an accompanying URI to execute.

Examples include opening a specific file, navigating to a URL, or opening a directory in a file browser.

Summary

Constants
static Int

Action type: Open File.

static Int

Action type: Open Folder.

static Int

Action type: Open URL.

Public constructors
UriCustomizationAction(actionType: Int, uri: Uri)

Creates a new UriCustomizationAction.

Public methods
Boolean
equals(other: Any?)

Int

Gets the action type associated with this customization.

Uri

Gets the URI for this action.

Int

Constants

TYPE_OPEN_FILE

static val TYPE_OPEN_FILE: Int

Action type: Open File.

Specifies the action to open a file when the peripheral input is triggered.

Value: 1

TYPE_OPEN_FOLDER

static val TYPE_OPEN_FOLDER: Int

Action type: Open Folder.

Specifies the action to launch the system file browser for a specific directory when the peripheral input is triggered.

Value: 2

TYPE_OPEN_URL

static val TYPE_OPEN_URL: Int

Action type: Open URL.

Specifies the action to open a web URL when the peripheral input is triggered.

Value: 3

Public constructors

UriCustomizationAction

UriCustomizationAction(
    actionType: Int,
    uri: Uri)

Creates a new UriCustomizationAction.

Parameters
actionType Int: The type of action to create.
Value is one of the following:
uri Uri: The URI to be opened.
This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the action type is invalid.
java.lang.NullPointerException if the uri is null.

Public methods

equals

fun equals(other: Any?): Boolean

getType

fun getType(): Int

Gets the action type associated with this customization.

Return
Int Value is one of the following:

getUri

fun getUri(): Uri

Gets the URI for this action.

Return
Uri The target Uri.
This value cannot be null.

hashCode

fun hashCode(): Int