Legacy | Device state
-
Command: device
-
Subcommand: position
-
Supported Platforms: Native (legacy)
-
Supported OS: Android, iOS
Modifies the device state. It is used with devices that have flip and slide capabilities.
Description
Changes the mechanical position of a device that supports a flip cover or slide keyboard. The operation parameter indicates what action to take.
Parameters
Name |
Value |
Default |
Description |
---|---|---|---|
deviceId* |
The device for this command. |
||
operation |
reset (Reset) next (Next) |
The state operation to perform on the device. Reset - return the device to its default state Next - adjust the device to its next state |
|
state |
open (Opened) closed (Closed) secondary (Secondary) |
The device state. Opened - open the device flip / slider or swivel Closed - close the device flip / slider or swivel Secondary - open the device secondary slider state (if applicable) |
* Mandatory parameter
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-13_08_16_27_239?operation=command&securityToken=<your_token>&command=device&subcommand=position¶m.deviceId=04157DF47CA01828¶m.operation=reset
JSON response
{
"executionId":"john@perfectomobile.com_controller_16-11-13_08_16_27_239",
"reason":"Success",
"timer.elapsed":"65",
"testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-13_08_16_27_239",
"timer.ux":"65",
"singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161113/controller_16-11-13_08_16_27_239.xml&ownerId=john@perfectomobile.com&sharingCode=ace2abb5-1429-4de1-9769-67dd4c27db5a",
"description":"Success",
"timer.system":"0",
"reportKey":"PRIVATE:controller/161113/controller_16-11-13_08_16_27_239.xml",
"completed":"true",
"flowEndCode":"SUCCEEDED",
"timer.device":"65"}