getSystemInfo(params: Object)
Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Get system information
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
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 | BaseKit Since |
|---|---|---|---|
is24Hour | boolean | Whether 24-hour format is used | v3.2.6 |
system | string | OS and version | v3.2.6 |
brand | string | Device brand | v3.2.6 |
model | string | Device model | v3.2.6 |
platform | string | System type, e.g., ios, android, harmony | v3.2.6 |
timezoneId | string | Time zone ID | v3.2.6 |
pixelRatio | number | Device pixel ratio | v3.2.6 |
screenWidth | number | Screen width in logical pixels, e.g., 411 | v3.2.6 |
screenHeight | number | Screen height in logical pixels, e.g., 914 | v3.2.6 |
windowWidth | number | Window width in logical pixels, e.g., 411 | v3.2.6 |
windowHeight | number | Window height in logical pixels, e.g., 914 | v3.2.6 |
useableWindowWidth | number | Available window width in logical pixels, e.g., 411 | v3.3.2 |
useableWindowHeight | number | Available window height in logical pixels, e.g., 814 | v3.3.2 |
statusBarHeight | number | Status bar height in logical pixels, e.g., 34 | v3.2.6 |
language | string | Current language | v3.2.6 |
| Safe area information; fields are in logical pixels, e.g., { left: 0, right: 411, top: 34, bottom: 898, width: 411, height: 864 } | v3.2.6 | ||
albumAuthorized | boolean | Whether access to the photo album is allowed | v3.2.6 |
cameraAuthorized | boolean | Whether camera access is allowed | v3.2.6 |
locationAuthorized | boolean | Whether location access is allowed | v3.2.6 |
microphoneAuthorized | boolean | Whether microphone access is allowed | v3.2.6 |
notificationAuthorized | boolean | Whether sending notifications is allowed | v3.2.6 |
notificationAlertAuthorized | boolean | Whether notification alerts are allowed | v3.2.6 |
notificationBadgeAuthorized | boolean | Whether notification badges are allowed | v3.2.6 |
notificationSoundAuthorized | boolean | Whether notification sounds are allowed | v3.2.6 |
bluetoothEnabled | boolean | Whether Bluetooth is enabled | v3.2.6 |
locationEnabled | boolean | Whether location services are enabled | v3.2.6 |
wifiEnabled | boolean | Whether Wi-Fi is enabled | v3.2.6 |
theme | "dark" | "light" | Current theme | v3.2.6 |
deviceOrientation | "portrait" | "landscape" | Current screen orientation | v3.2.6 |
deviceLevel | string | Device level (low: low - middle: middle - high: high) | v3.3.3 |
isSupportPinShortcut | boolean | Whether the phone OS supports creating shortcuts (Android only) | v3.5.0 |
deviceType | string | Device type phone: Phone pad: Tablet | v3.10.6 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
success.params.theme
| Value | Description | BaseKit Since |
|---|---|---|
dark | Dark mode | - |
light | Light mode | - |
success.params.deviceOrientation
| Value | Description | BaseKit Since |
|---|---|---|
portrait | Portrait | - |
landscape | Landscape | - |