Skip to content

Touch - Drag

Request

Drag between two points on the Cloud Phone screen.

  • Preconditions: the phone must be powered on and not held by another member. Supported on compatible device models only; incompatible models reject the call.
  • Note: on some models this is the same implementation as swipe — the service delegates drag straight to the swipe routine, so the two are indistinguishable there. Other models have a separate drag action.
  • Completion: synchronous. data.status is finish or pending.
  • Retry: no deduplication; a repeat call drags again.

Documented business errors: 33300, 33301, 33401. See Error Codes for what each code means. Any operation can additionally return the common codes.

Security
Authorization
Bodyapplication/jsonrequired
idstringrequired

Cloud Phone ID

Example:"1558968155668507"
pos1Array of integers, = 2 itemsrequired

Start coordinates [x, y]

Example:
[ 540, 1500 ]
pos2Array of integers, = 2 itemsrequired

End coordinates [x, y]

Example:
[ 540, 500 ]
durationinteger

Swipe/drag duration in milliseconds. A larger value results in a slower action.

Example:300
curl -i -X POST \
  https://api.morelogin.com/cloudphone/touch/drag \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "1558968155668507",
    "pos1": [
      200,
      500
    ],
    "pos2": [
      800,
      500
    ],
    "duration": 500
  }'

Responses

Operation successful

Bodyapplication/json
codeinteger

Status code, 0 means success

Example:0
msgstring or null

Response message

Example:"success"
dataobject
Response
{ "code": 0, "msg": "success", "data": { "status": "finish" } }