Skip to content

Swipe Operation

Execute a swipe operation from starting coordinates to ending coordinates.

Interface Description

Interface Type

swipe

Parameters

ParameterTypeRequiredDefaultDescription
deviceIdstring-Device ID
startarray-Starting coordinates [x, y]
endarray-Ending coordinates [x, y]
keystring'LEFT'Key type, 'LEFT' or 'RIGHT'
pressTimenumber58Press delay before swipe (milliseconds)

Return Value

javascript
true  // Returns true on successful operation

Basic Usage

Simple Swipe

javascript
// Simulate pull down to open notification center
await apiInvoke('swipe', {
    deviceId: 'P72578581E07',
    start: [screenWidth / 2, 0],
    end: [screenWidh / 2, screenHeight * 0.8]
});

Cooperation: try.catch@foxmail.com