SimpleCustomizationAction


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

Represents predefined simple actions, such as Volume up/down, Screenshot, etc.

Summary

Constants
static Int

Action type: Assist.

static Int

Action type: Back.

static Int

Action type: Brightness down.

static Int

Action type: Brightness up.

static Int

Action type: Calculator.

static Int

Action type: Close window.

static Int

Action type: Contextual Insert.

static Int

Action type: Contextual Query.

static Int

Action type: Contextual Search.

static Int

Action type: Dictation.

static Int

Action type: Do nothing.

static Int

Action type: Emoji menu.

static Int

Action type: Forward.

static Int

Action type: Lock screen.

static Int

Action type: Media next.

static Int

Action type: Media play/pause.

static Int

Action type: Media previous.

static Int

Action type: Partial Screenshot.

static Int

Action type: Print screen.

static Int

Action type: Screen capture.

static Int

Action type: Show desktop.

static Int

Action type: Voice Assist.

static Int

Action type: Volume down.

static Int

Action type: Volume mute.

static Int

Action type: Volume up.

Public constructors

Creates a new SimpleCustomizationAction with the specified action type.

Public methods
Boolean
equals(other: Any?)

Int

Returns the specific type of action to be performed.

Int

Constants

TYPE_ASSIST

static val TYPE_ASSIST: Int

Action type: Assist.

Specifies the action to launch the default assistant for textual input when the peripheral input is triggered.

Value: 21

TYPE_BACK

static val TYPE_BACK: Int

Action type: Back.

Specifies the action to go back when the peripheral input is triggered.

Value: 1

TYPE_BRIGHTNESS_DOWN

static val TYPE_BRIGHTNESS_DOWN: Int

Action type: Brightness down.

Specifies the action to decrease screen brightness when the peripheral input is triggered.

Value: 2

TYPE_BRIGHTNESS_UP

static val TYPE_BRIGHTNESS_UP: Int

Action type: Brightness up.

Specifies the action to increase screen brightness when the peripheral input is triggered.

Value: 3

TYPE_CALCULATOR

static val TYPE_CALCULATOR: Int

Action type: Calculator.

Specifies the action to launch calculator app when the peripheral input is triggered.

Value: 4

TYPE_CLOSE_WINDOW

static val TYPE_CLOSE_WINDOW: Int

Action type: Close window.

Specifies the action to close the currently focused window when the peripheral input is triggered.

Value: 19

TYPE_CONTEXTUAL_INSERT

static val TYPE_CONTEXTUAL_INSERT: Int

Action type: Contextual Insert.

Specifies the action to trigger a contextual panel for inserting content into the focused input field when the peripheral input is triggered.

Value: 22

TYPE_CONTEXTUAL_QUERY

static val TYPE_CONTEXTUAL_QUERY: Int

Action type: Contextual Query.

Specifies the action to launch the contextual cursor. When available, this intelligent pointer analyzes screen elements beneath the cursor (such as images or text paragraphs) and displays contextual suggestions to discover available actions (like copy, translate, or share) when the peripheral input is triggered.

Value: 24
static val TYPE_CONTEXTUAL_SEARCH: Int

Action type: Contextual Search.

Specifies the action to launch a search experience that allows the user to search for information about any content displayed on the screen - using gestures like circling, highlighting, or tapping - without switching apps, when the peripheral input is triggered.

Value: 23

TYPE_DICTATION

static val TYPE_DICTATION: Int

Action type: Dictation.

Specifies the action to start dictation when the peripheral input is triggered.

Value: 5

TYPE_DO_NOTHING

static val TYPE_DO_NOTHING: Int

Action type: Do nothing.

Specifies that no action should occur when the peripheral input is triggered, effectively swallowing the default hardware behavior.

Value: 18

TYPE_EMOJI_MENU

static val TYPE_EMOJI_MENU: Int

Action type: Emoji menu.

Specifies the action to show emoji menu when the peripheral input is triggered.

Value: 6

TYPE_FORWARD

static val TYPE_FORWARD: Int

Action type: Forward.

Specifies the action to go forward when the peripheral input is triggered.

Value: 7

TYPE_LOCK

static val TYPE_LOCK: Int

Action type: Lock screen.

Specifies the action to lock screen when the peripheral input is triggered.

Value: 8

TYPE_MEDIA_NEXT

static val TYPE_MEDIA_NEXT: Int

Action type: Media next.

Specifies the action to skip to the next media track when the peripheral input is triggered.

Value: 9

TYPE_MEDIA_PLAY_PAUSE

static val TYPE_MEDIA_PLAY_PAUSE: Int

Action type: Media play/pause.

Specifies the action to toggle media play/pause when the peripheral input is triggered.

Value: 10

TYPE_MEDIA_PREVIOUS

static val TYPE_MEDIA_PREVIOUS: Int

Action type: Media previous.

Specifies the action to skip to the previous media track when the peripheral input is triggered.

Value: 11

TYPE_PARTIAL_SCREENSHOT

static val TYPE_PARTIAL_SCREENSHOT: Int

Action type: Partial Screenshot.

Specifies the action to activate the system region capture utility to take a partial screenshot when the peripheral input is triggered.

Value: 20

TYPE_PRINT_SCREEN

static val TYPE_PRINT_SCREEN: Int

Action type: Print screen.

Specifies the action to take a snapshot that is first sent to the foreground app for handling. If the app does not consume it, the framework captures the screen, mimicking android.view.KeyEvent#KEYCODE_SYSRQ.

Value: 12

TYPE_SCREEN_CAPTURE

static val TYPE_SCREEN_CAPTURE: Int

Action type: Screen capture.

Specifies the action to trigger a global framework-level screenshot. Unlike TYPE_PRINT_SCREEN, this action bypasses the foreground app and typically displays system UI tools for editing or sharing.

Value: 13

TYPE_SHOW_DESKTOP

static val TYPE_SHOW_DESKTOP: Int

Action type: Show desktop.

Specifies the action to show desktop when the peripheral input is triggered.

Value: 14

TYPE_VOICE_ASSIST

static val TYPE_VOICE_ASSIST: Int

Action type: Voice Assist.

Specifies the action to launch the default assistant for voice input when the peripheral input is triggered.

Value: 25

TYPE_VOLUME_DOWN

static val TYPE_VOLUME_DOWN: Int

Action type: Volume down.

Specifies the action to decrease the current system volume level when the peripheral input is triggered.

Value: 15

TYPE_VOLUME_MUTE

static val TYPE_VOLUME_MUTE: Int

Action type: Volume mute.

Specifies the action to toggle the system mute state or mute the current volume when the peripheral input is triggered.

Value: 16

TYPE_VOLUME_UP

static val TYPE_VOLUME_UP: Int

Action type: Volume up.

Specifies the action to increase the current system volume level when the peripheral input is triggered.

Value: 17

Public constructors

SimpleCustomizationAction

SimpleCustomizationAction(actionType: Int)

Creates a new SimpleCustomizationAction with the specified action type.

Parameters
actionType Int: The type of action to be performed, such as TYPE_SCREEN_CAPTURE.
Value is one of the following:
Exceptions
java.lang.IllegalArgumentException if the provided action type does not match any defined android.hardware.input.SimpleCustomizationAction.Type.

Public methods

equals

fun equals(other: Any?): Boolean

getType

fun getType(): Int

Returns the specific type of action to be performed.

The returned value corresponds to one of the action type constants, such as TYPE_SCREEN_CAPTURE which defines the behavior triggered by the peripheral customization.

Return
Int the type of action.
Value is one of the following:

hashCode

fun hashCode(): Int