getSystemInfoSync

Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid

Method signature
getSystemInfoSync()
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.2.0

Description

Get system information

Parameters

None

Return Value

Type: Object↓
PropertyTypeDescriptionBaseKit SinceMinimum SDK versions
is24HourbooleanWhether 24-hour format is used-—
systemstringOS and version-—
brandstringDevice brand-—
modelstringDevice model-—
platformstringSystem type, such as ios, android, harmony-—
timezoneIdstringTime zone identifier-—
pixelRationumberPixel ratio-—
screenWidthnumberScreen width in logical pixels, e.g., 411-—
screenHeightnumberScreen height in logical pixels, e.g., 914-—
windowWidthnumberWindow width in logical pixels, e.g., 411-—
windowHeightnumberWindow height in logical pixels, e.g., 914-—
useableWindowWidthnumberUsable window width in logical pixels, e.g., 411v3.3.2—
useableWindowHeightnumberUsable window height in logical pixels, e.g., 814v3.3.2—
statusBarHeightnumberStatus bar height in logical pixels, e.g., 34-—
languagestringCurrent language-—
Safe area information; fields are in logical pixels, e.g., { left: 0, right: 411, top: 34, bottom: 898, width: 411, height: 864 }-—
albumAuthorizedbooleanWhether access to the photo album is allowed-—
cameraAuthorizedbooleanWhether access to the camera is allowed-—
locationAuthorizedbooleanWhether access to location is allowed-—
microphoneAuthorizedbooleanWhether access to the microphone is allowed-—
notificationAuthorizedbooleanWhether sending notifications is allowed-—
notificationAlertAuthorizedbooleanWhether notification alerts are allowed-—
notificationBadgeAuthorizedbooleanWhether notification badges are allowed-—
notificationSoundAuthorizedbooleanWhether notification sounds are allowed-—
bluetoothEnabledbooleanWhether Bluetooth is enabled-—
locationEnabledbooleanWhether location services are enabled-—
wifiEnabledbooleanWhether Wi-Fi is enabled-—
theme"dark" | "light"Current theme-—
deviceOrientation"portrait" | "landscape"Current screen orientation-—
deviceLevelstringDevice level (low: low - middle: middle - high: high)v3.3.3—
isSupportPinShortcutbooleanWhether the phone OS supports creating shortcuts (Android only)v3.5.0—
deviceTypestringDevice type phone: phone pad: tabletv3.10.6
iOSThingSmartBaseKitBizBundle
≥ 5.11.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.11.0

Valid Values

return.theme
ValueDescriptionBaseKit Since
darkDark mode-
lightLight mode-
return.deviceOrientation
ValueDescriptionBaseKit Since
portraitPortrait-
landscapeLandscape-

Examples

import { getSystemInfo } from '@ray-js/ray'

getSystemInfo({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});