getSystemInfoSync()
Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Get system information
Parameters
None
Return Value
Type: Object↓
| Property | Type | Description | BaseKit Since |
|---|---|---|---|
is24Hour | boolean | Whether 24-hour format is used | - |
system | string | OS and version | - |
brand | string | Device brand | - |
model | string | Device model | - |
platform | string | System type, such as ios, android, harmony | - |
timezoneId | string | Time zone identifier | - |
pixelRatio | number | Pixel ratio | - |
screenWidth | number | Screen width in logical pixels, e.g., 411 | - |
screenHeight | number | Screen height in logical pixels, e.g., 914 | - |
windowWidth | number | Window width in logical pixels, e.g., 411 | - |
windowHeight | number | Window height in logical pixels, e.g., 914 | - |
useableWindowWidth | number | Usable window width in logical pixels, e.g., 411 | v3.3.2 |
useableWindowHeight | number | Usable window height in logical pixels, e.g., 814 | v3.3.2 |
statusBarHeight | number | Status bar height in logical pixels, e.g., 34 | - |
language | string | Current language | - |
| Safe area information; fields are in logical pixels, e.g., { left: 0, right: 411, top: 34, bottom: 898, width: 411, height: 864 } | - | ||
albumAuthorized | boolean | Whether access to the photo album is allowed | - |
cameraAuthorized | boolean | Whether access to the camera is allowed | - |
locationAuthorized | boolean | Whether access to location is allowed | - |
microphoneAuthorized | boolean | Whether access to the microphone is allowed | - |
notificationAuthorized | boolean | Whether sending notifications is allowed | - |
notificationAlertAuthorized | boolean | Whether notification alerts are allowed | - |
notificationBadgeAuthorized | boolean | Whether notification badges are allowed | - |
notificationSoundAuthorized | boolean | Whether notification sounds are allowed | - |
bluetoothEnabled | boolean | Whether Bluetooth is enabled | - |
locationEnabled | boolean | Whether location services are enabled | - |
wifiEnabled | boolean | Whether Wi-Fi is enabled | - |
theme | "dark" | "light" | Current theme | - |
deviceOrientation | "portrait" | "landscape" | Current screen orientation | - |
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 |
Valid Values
return.theme
| Value | Description | BaseKit Since |
|---|---|---|
dark | Dark mode | - |
light | Light mode | - |
return.deviceOrientation
| Value | Description | BaseKit Since |
|---|---|---|
portrait | Portrait | - |
landscape | Landscape | - |