Skip to content

Send Action ​

Execute system-level quick actions, such as returning to home screen, opening app switcher, controlling volume and brightness, etc.

Interface Description ​

Interface Type ​

sendAction

Parameters ​

ParameterTypeRequiredDescription
deviceIdstring✅Device ID
actionstring✅Action type (see supported actions list below)

Return Value ​

javascript
true  // Returns true on successful operation

Supported Actions ​

Action ValueCategoryDescription
homeNavigationReturn to home screen (Home button)
switcherNavigationOpen app switcher (multitasking interface)
spotlight_searchNavigationOpen Spotlight search
screen_keyboardInputShow/hide on-screen keyboard
inputmethod_switchInputSwitch input method
volume_muteVolume ControlMute/unmute
volume_incrementVolume ControlIncrease volume
volume_decrementVolume ControlDecrease volume
brightness_incrementBrightness ControlIncrease screen brightness
brightness_decrementBrightness ControlDecrease screen brightness

Usage Examples ​

Return to Home and Open App Switcher ​

javascript
// Return to home screen
await apiInvoke('sendAction', {
    deviceId: 'P72578581E07',
    action: 'home'
});

// Wait 1 second
await new Promise(resolve => setTimeout(resolve, 1000));

// Open app switcher
await apiInvoke('sendAction', {
    deviceId: 'P72578581E07',
    action: 'switcher'
});

Cooperation: try.catch@foxmail.com