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
sendActionParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId | string | ✅ | Device ID |
action | string | ✅ | Action type (see supported actions list below) |
Return Value
javascript
true // Returns true on successful operationSupported Actions
| Action Value | Category | Description |
|---|---|---|
home | Navigation | Return to home screen (Home button) |
switcher | Navigation | Open app switcher (multitasking interface) |
spotlight_search | Navigation | Open Spotlight search |
screen_keyboard | Input | Show/hide on-screen keyboard |
inputmethod_switch | Input | Switch input method |
volume_mute | Volume Control | Mute/unmute |
volume_increment | Volume Control | Increase volume |
volume_decrement | Volume Control | Decrease volume |
brightness_increment | Brightness Control | Increase screen brightness |
brightness_decrement | Brightness Control | Decrease 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'
});