sud.getSystemInfo
JS
sud.getSystemInfo(Object object)Deprecated
This API retrieves system information and is no longer maintained. Use sud.getSystemSetting, sud.getAppAuthorizeSetting, sud.getDeviceInfo, or sud.getWindowInfo according to the information you need.
Parameters
- Object object: The input parameters; see the table below for details.
Properties of object:
| Property | Type | Required | Description |
|---|---|---|---|
| success | function | No | Callback function for a successful API call |
| fail | function | No | Callback function for a failed API call |
| complete | function | No | Callback function for API call completion |
Parameters of the success callback
- Object res: Returns the system information.
Properties of the system information:
| Property | Type | Description |
|---|---|---|
| brand | string | Phone brand |
| model | string | Phone model |
| pixelRatio | number | Device pixel ratio |
| screenWidth | number | Screen width, in px |
| screenHeight | number | Screen height, in px |
| windowWidth | number | Usable window width, in px |
| windowHeight | number | Usable window height, in px |
| statusBarHeight | number | Status bar height, in px |
| language | string | System language |
| coreVersion | string | Client base library version |
| system | string | Operating system version |
| platform | string | Client platform |
| cameraAuthorized | boolean | Whether camera permission is granted |
| locationAuthorized | boolean | Whether location permission is granted |
| microphoneAuthorized | boolean | Whether microphone permission is granted |
| notificationAuthorized | boolean | Whether notification permission is granted |
| locationEnabled | boolean | Whether the system location switch is on |
| wifiEnabled | boolean | Whether the system Wi-Fi switch is on |
| safeArea | Object | Safe area in the upright portrait orientation, in the window coordinate system |
Properties of the safeArea property
| Property | Type | Description |
|---|---|---|
| left | number | X coordinate of the top-left corner of the safe area, in logical pixels |
| right | number | X coordinate of the bottom-right corner of the safe area, in logical pixels |
| top | number | Y coordinate of the top-left corner of the safe area, in logical pixels |
| bottom | number | Y coordinate of the bottom-right corner of the safe area, in logical pixels |
| width | number | Width of the safe area, in logical pixels |
| height | number | Height of the safe area, in logical pixels |
