setDeviceProperty(params: Object)
Requires:
DeviceKit≥1.2.6@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
Description
Set device properties
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | deviceId |
code | string | Yes | Attribute key |
value | string | Yes | Attribute value |
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | DeviceKit Since |
|---|---|---|---|
deviceId | string | deviceId | v3.3.0 |
result | boolean | Whether the setting succeeded | v3.3.0 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None