Skip to main content

getSystemInfo

Description

Get information about the system

Parameters

N/A

Return Value

ParamData typeDescription
modelstringCellphone model.
languagestringThe language set by the user in the app. If the app does not support the language setting, return the system language.
versionstringApp version number.
storagestringDevice disk capacity.
currentBatterystringCurrent battery percentage.
platformstringSystem name.
brandstringCellphone brand.
systemstringSystem version.
screenWidthnumberScreen width in device pixels (this value may change if the device orientation changes).
screenHeightnumberScreen 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"
}