getSystemInfo
Description
Get information about the system
Parameters
N/A
Return Value
| Param | Data type | Description |
|---|---|---|
| model | string | Cellphone model. |
| language | string | The language set by the user in the app. If the app does not support the language setting, return the system language. |
| version | string | App version number. |
| storage | string | Device disk capacity. |
| currentBattery | string | Current battery percentage. |
| platform | string | System name. |
| brand | string | Cellphone brand. |
| system | string | System version. |
| screenWidth | number | Screen width in device pixels (this value may change if the device orientation changes). |
| screenHeight | number | Screen height in device pixels (this value may change if the device orientation changes). |
Error Code
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.Device.getSystemInfo()
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{
"data": {
"model": "iPhone12,1",
"language": "en-US",
"version": "1.2.3",
"storage": "128GB",
"currentBattery": "86%",
"platform": "iOS",
"brand": "Apple",
"system": "iOS 14.4",
"screenWidth": 828,
"screenHeight": 1792
},
"status": "success"
}