UNPKG

react-native-device-info

Version:
972 lines (879 loc) 152 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.syncUniqueId = syncUniqueId; exports.getMacAddress = getMacAddress; exports.getMacAddressSync = getMacAddressSync; exports.getReadableVersion = getReadableVersion; exports.hasNotch = hasNotch; exports.hasDynamicIsland = hasDynamicIsland; exports.getTotalDiskCapacityOld = getTotalDiskCapacityOld; exports.getTotalDiskCapacityOldSync = getTotalDiskCapacityOldSync; exports.getFreeDiskStorageOld = getFreeDiskStorageOld; exports.getFreeDiskStorageOldSync = getFreeDiskStorageOldSync; exports.isLandscape = isLandscape; exports.isLandscapeSync = isLandscapeSync; exports.hasSystemFeature = hasSystemFeature; exports.hasSystemFeatureSync = hasSystemFeatureSync; exports.isLowBatteryLevel = isLowBatteryLevel; exports.getDeviceToken = getDeviceToken; exports.useBatteryLevel = useBatteryLevel; exports.useBatteryLevelIsLow = useBatteryLevelIsLow; exports.usePowerState = usePowerState; exports.useIsHeadphonesConnected = useIsHeadphonesConnected; exports.useIsWiredHeadphonesConnected = useIsWiredHeadphonesConnected; exports.useIsBluetoothHeadphonesConnected = useIsBluetoothHeadphonesConnected; exports.useFirstInstallTime = useFirstInstallTime; exports.useDeviceName = useDeviceName; exports.useHasSystemFeature = useHasSystemFeature; exports.useIsEmulator = useIsEmulator; exports.useManufacturer = useManufacturer; exports.useBrightness = useBrightness; exports.getPowerState = exports.getBatteryLevelSync = exports.getBatteryLevel = exports.getFreeDiskStorageSync = exports.getFreeDiskStorage = exports.getTotalDiskCapacitySync = exports.getTotalDiskCapacity = exports.getMaxMemorySync = exports.getMaxMemory = exports.getTotalMemorySync = exports.getTotalMemory = exports.getCarrierSync = exports.getCarrier = exports.getStartupTimeSync = exports.getStartupTime = exports.getLastUpdateTimeSync = exports.getLastUpdateTime = exports.getInstallReferrerSync = exports.getInstallReferrer = exports.getFirstInstallTimeSync = exports.getFirstInstallTime = exports.hasHmsSync = exports.hasHms = exports.hasGmsSync = exports.hasGms = exports.isPinOrFingerprintSetSync = exports.isPinOrFingerprintSet = exports.isDisplayZoomed = exports.isLowRamDevice = exports.isTablet = exports.isEmulatorSync = exports.isEmulator = exports.getIncrementalSync = exports.getIncremental = exports.getCodenameSync = exports.getCodename = exports.getSecurityPatchSync = exports.getSecurityPatch = exports.getPreviewSdkIntSync = exports.getPreviewSdkInt = exports.getBaseOsSync = exports.getBaseOs = exports.getTypeSync = exports.getType = exports.getTagsSync = exports.getTags = exports.getProductSync = exports.getProduct = exports.getHostNamesSync = exports.getHostNames = exports.getHostSync = exports.getHost = exports.getHardwareSync = exports.getHardware = exports.getFingerprintSync = exports.getFingerprint = exports.getDisplaySync = exports.getDisplay = exports.getDeviceSync = exports.getDevice = exports.getBootloaderSync = exports.getBootloader = exports.getFontScaleSync = exports.getFontScale = exports.getUserAgentSync = exports.getUserAgent = exports.getUsedMemorySync = exports.getUsedMemory = exports.getDeviceNameSync = exports.getDeviceName = exports.getVersion = exports.getBuildNumber = exports.getApplicationName = exports.getInstallerPackageNameSync = exports.getInstallerPackageName = exports.getBundleId = exports.getApiLevelSync = exports.getApiLevel = exports.getBuildIdSync = exports.getBuildId = exports.getSystemVersion = exports.getSystemName = exports.getBrand = exports.getModel = exports.getManufacturerSync = exports.getManufacturer = exports.getDeviceId = exports.isCameraPresentSync = exports.isCameraPresent = exports.getIpAddressSync = exports.getIpAddress = exports.getAppSetId = exports.getAndroidIdSync = exports.getAndroidId = exports.getSerialNumberSync = exports.getSerialNumber = exports.getInstanceIdSync = exports.getInstanceId = exports.getUniqueIdSync = exports.getUniqueId = void 0; exports.default = exports.DeviceInfo = exports.getBrightnessSync = exports.getBrightness = exports.getAvailableLocationProvidersSync = exports.getAvailableLocationProviders = exports.isTabletMode = exports.getSupportedMediaTypeListSync = exports.getSupportedMediaTypeList = exports.isKeyboardConnectedSync = exports.isKeyboardConnected = exports.isMouseConnectedSync = exports.isMouseConnected = exports.isBluetoothHeadphonesConnectedSync = exports.isBluetoothHeadphonesConnected = exports.isWiredHeadphonesConnectedSync = exports.isWiredHeadphonesConnected = exports.isHeadphonesConnectedSync = exports.isHeadphonesConnected = exports.isLocationEnabledSync = exports.isLocationEnabled = exports.getSystemAvailableFeaturesSync = exports.getSystemAvailableFeatures = exports.supported64BitAbisSync = exports.supported64BitAbis = exports.supported32BitAbisSync = exports.supported32BitAbis = exports.supportedAbisSync = exports.supportedAbis = exports.getDeviceTypeSync = exports.getDeviceType = exports.isAirplaneModeSync = exports.isAirplaneMode = exports.isBatteryChargingSync = exports.isBatteryCharging = exports.getPowerStateSync = void 0; var _react = require("react"); var _reactNative = require("react-native"); var _asyncHookWrappers = require("./internal/asyncHookWrappers"); var _devicesWithDynamicIsland = _interopRequireDefault(require("./internal/devicesWithDynamicIsland")); var _devicesWithNotch = _interopRequireDefault(require("./internal/devicesWithNotch")); var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface")); var _supportedPlatformInfo = require("./internal/supported-platform-info"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const [getUniqueIdInternal, getUniqueIdSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'uniqueId', supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.getUniqueId(), syncGetter: () => _nativeInterface.default.getUniqueIdSync(), defaultValue: 'unknown' }); /** * Retrieves the unique ID information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getUniqueId(); * ``` */ const getUniqueId = getUniqueIdInternal; /** * Synchronous variant of {@link getUniqueId}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getUniqueIdSync(); * ``` */ exports.getUniqueId = getUniqueId; const getUniqueIdSync = getUniqueIdSyncInternal; exports.getUniqueIdSync = getUniqueIdSync; let uniqueId; /** * Preloads the unique ID on iOS so that {@link getUniqueId} can resolve synchronously later in the app lifecycle. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await syncUniqueId(); * ``` */ async function syncUniqueId() { if (_reactNative.Platform.OS === 'ios') { uniqueId = await _nativeInterface.default.syncUniqueId(); } else { uniqueId = await getUniqueId(); } return uniqueId; } const [getInstanceIdInternal, getInstanceIdSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'instanceId', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getInstanceId(), syncGetter: () => _nativeInterface.default.getInstanceIdSync(), defaultValue: 'unknown' }); /** * Retrieves the instance ID information reported by the native platform. * @example * ```ts * const result = await getInstanceId(); * ``` */ const getInstanceId = getInstanceIdInternal; /** * Synchronous variant of {@link getInstanceId}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getInstanceIdSync(); * ``` */ exports.getInstanceId = getInstanceId; const getInstanceIdSync = getInstanceIdSyncInternal; exports.getInstanceIdSync = getInstanceIdSync; const [getSerialNumberInternal, getSerialNumberSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'serialNumber', supportedPlatforms: ['android', 'windows'], getter: () => _nativeInterface.default.getSerialNumber(), syncGetter: () => _nativeInterface.default.getSerialNumberSync(), defaultValue: 'unknown' }); /** * Retrieves the serial number information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getSerialNumber(); * ``` */ const getSerialNumber = getSerialNumberInternal; /** * Synchronous variant of {@link getSerialNumber}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getSerialNumberSync(); * ``` */ exports.getSerialNumber = getSerialNumber; const getSerialNumberSync = getSerialNumberSyncInternal; exports.getSerialNumberSync = getSerialNumberSync; const [getAndroidIdInternal, getAndroidIdSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'androidId', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getAndroidId(), syncGetter: () => _nativeInterface.default.getAndroidIdSync(), defaultValue: 'unknown' }); /** * Retrieves the Android ID information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getAndroidId(); * ``` */ const getAndroidId = getAndroidIdInternal; /** * Synchronous variant of {@link getAndroidId}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getAndroidIdSync(); * ``` */ exports.getAndroidId = getAndroidId; const getAndroidIdSync = getAndroidIdSyncInternal; /** * Retrieves the app set ID information reported by the native platform. * *![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getAppSetId(); * ``` */ exports.getAndroidIdSync = getAndroidIdSync; const getAppSetId = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoAsync)({ memoKey: 'appSetId', defaultValue: { id: 'unknown', scope: -1 }, supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getAppSetId() }); exports.getAppSetId = getAppSetId; const [getIpAddressInternal, getIpAddressSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.getIpAddress(), syncGetter: () => _nativeInterface.default.getIpAddressSync(), defaultValue: 'unknown' }); /** * Retrieves the IP address information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getIpAddress(); * ``` */ const getIpAddress = getIpAddressInternal; /** * Synchronous variant of {@link getIpAddress}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getIpAddressSync(); * ``` */ exports.getIpAddress = getIpAddress; const getIpAddressSync = getIpAddressSyncInternal; exports.getIpAddressSync = getIpAddressSync; const [isCameraPresentInternal, isCameraPresentSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ supportedPlatforms: ['android', 'windows', 'web'], getter: () => _nativeInterface.default.isCameraPresent(), syncGetter: () => _nativeInterface.default.isCameraPresentSync(), defaultValue: false }); /** * Returns true when at least one hardware camera is available on the device. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await isCameraPresent(); * ``` */ const isCameraPresent = isCameraPresentInternal; /** * Synchronous variant of {@link isCameraPresent}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = isCameraPresentSync(); * ``` */ exports.isCameraPresent = isCameraPresent; const isCameraPresentSync = isCameraPresentSyncInternal; /** * Retrieves the WiFi MAC address on Android and returns a constant placeholder for other platforms. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getMacAddress(); * ``` */ exports.isCameraPresentSync = isCameraPresentSync; async function getMacAddress() { if (_reactNative.Platform.OS === 'android') { return _nativeInterface.default.getMacAddress(); } else if (_reactNative.Platform.OS === 'ios') { return '02:00:00:00:00:00'; } return 'unknown'; } /** * Synchronous variant of {@link getMacAddress}. * * @example * ```ts * const result = getMacAddressSync(); * ``` */ function getMacAddressSync() { if (_reactNative.Platform.OS === 'android') { return _nativeInterface.default.getMacAddressSync(); } else if (_reactNative.Platform.OS === 'ios') { return '02:00:00:00:00:00'; } return 'unknown'; } /** * Retrieves the device ID information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getDeviceId(); * ``` */ const getDeviceId = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ defaultValue: 'unknown', memoKey: 'deviceId', getter: () => _nativeInterface.default.deviceId, supportedPlatforms: ['android', 'ios', 'windows'] }); exports.getDeviceId = getDeviceId; const [getManufacturerInternal, getManufacturerSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'manufacturer', supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _reactNative.Platform.OS == 'ios' ? Promise.resolve('Apple') : _nativeInterface.default.getSystemManufacturer(), syncGetter: () => _reactNative.Platform.OS == 'ios' ? 'Apple' : _nativeInterface.default.getSystemManufacturerSync(), defaultValue: 'unknown' }); /** * Retrieves the manufacturer information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getManufacturer(); * ``` */ const getManufacturer = getManufacturerInternal; /** * Synchronous variant of {@link getManufacturer}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getManufacturerSync(); * ``` */ exports.getManufacturer = getManufacturer; const getManufacturerSync = getManufacturerSyncInternal; /** * Retrieves the model information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getModel(); * ``` */ exports.getManufacturerSync = getManufacturerSync; const getModel = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'model', defaultValue: 'unknown', supportedPlatforms: ['ios', 'android', 'windows'], getter: () => _nativeInterface.default.model }); /** * Retrieves the brand information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getBrand(); * ``` */ exports.getModel = getModel; const getBrand = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'brand', supportedPlatforms: ['android', 'ios', 'windows'], defaultValue: 'unknown', getter: () => _nativeInterface.default.brand }); /** * Retrieves the system name information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getSystemName(); * ``` */ exports.getBrand = getBrand; const getSystemName = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ defaultValue: 'unknown', supportedPlatforms: ['ios', 'android', 'windows'], memoKey: 'systemName', getter: () => _reactNative.Platform.select({ ios: _nativeInterface.default.systemName, android: 'Android', windows: 'Windows', default: 'unknown' }) }); /** * Retrieves the system version information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getSystemVersion(); * ``` */ exports.getSystemName = getSystemName; const getSystemVersion = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ defaultValue: 'unknown', getter: () => _nativeInterface.default.systemVersion, supportedPlatforms: ['android', 'ios', 'windows'], memoKey: 'systemVersion' }); exports.getSystemVersion = getSystemVersion; const [getBuildIdInternal, getBuildIdSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'buildId', supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.getBuildId(), syncGetter: () => _nativeInterface.default.getBuildIdSync(), defaultValue: 'unknown' }); /** * Retrieves the build ID information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getBuildId(); * ``` */ const getBuildId = getBuildIdInternal; /** * Synchronous variant of {@link getBuildId}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getBuildIdSync(); * ``` */ exports.getBuildId = getBuildId; const getBuildIdSync = getBuildIdSyncInternal; exports.getBuildIdSync = getBuildIdSync; const [getApiLevelInternal, getApiLevelSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'apiLevel', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getApiLevel(), syncGetter: () => _nativeInterface.default.getApiLevelSync(), defaultValue: -1 }); /** * Retrieves the API level information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getApiLevel(); * ``` */ const getApiLevel = getApiLevelInternal; /** * Synchronous variant of {@link getApiLevel}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getApiLevelSync(); * ``` */ exports.getApiLevel = getApiLevel; const getApiLevelSync = getApiLevelSyncInternal; /** * Retrieves the bundle ID information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getBundleId(); * ``` */ exports.getApiLevelSync = getApiLevelSync; const getBundleId = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'bundleId', supportedPlatforms: ['android', 'ios', 'windows'], defaultValue: 'unknown', getter: () => _nativeInterface.default.bundleId }); exports.getBundleId = getBundleId; const [getInstallerPackageNameInternal, getInstallerPackageNameSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'installerPackageName', supportedPlatforms: ['android', 'windows', 'ios'], getter: () => _nativeInterface.default.getInstallerPackageName(), syncGetter: () => _nativeInterface.default.getInstallerPackageNameSync(), defaultValue: 'unknown' }); /** * Retrieves the installer package name information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getInstallerPackageName(); * ``` */ const getInstallerPackageName = getInstallerPackageNameInternal; /** * Synchronous variant of {@link getInstallerPackageName}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getInstallerPackageNameSync(); * ``` */ exports.getInstallerPackageName = getInstallerPackageName; const getInstallerPackageNameSync = getInstallerPackageNameSyncInternal; /** * Retrieves the application name information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getApplicationName(); * ``` */ exports.getInstallerPackageNameSync = getInstallerPackageNameSync; const getApplicationName = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'appName', defaultValue: 'unknown', getter: () => _nativeInterface.default.appName, supportedPlatforms: ['android', 'ios', 'windows'] }); /** * Retrieves the build number information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getBuildNumber(); * ``` */ exports.getApplicationName = getApplicationName; const getBuildNumber = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'buildNumber', supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.buildNumber, defaultValue: 'unknown' }); /** * Retrieves the version information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getVersion(); * ``` */ exports.getBuildNumber = getBuildNumber; const getVersion = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'version', defaultValue: 'unknown', supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.appVersion }); /** * Retrieves the readable version information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getReadableVersion(); * ``` */ exports.getVersion = getVersion; function getReadableVersion() { return getVersion() + '.' + getBuildNumber(); } const [getDeviceNameInternal, getDeviceNameSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.getDeviceName(), syncGetter: () => _nativeInterface.default.getDeviceNameSync(), defaultValue: 'unknown' }); /** * Retrieves the device name information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getDeviceName(); * ``` */ const getDeviceName = getDeviceNameInternal; /** * Synchronous variant of {@link getDeviceName}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getDeviceNameSync(); * ``` */ exports.getDeviceName = getDeviceName; const getDeviceNameSync = getDeviceNameSyncInternal; exports.getDeviceNameSync = getDeviceNameSync; const [getUsedMemoryInternal, getUsedMemorySyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ supportedPlatforms: ['android', 'ios', 'windows', 'web'], getter: () => _nativeInterface.default.getUsedMemory(), syncGetter: () => _nativeInterface.default.getUsedMemorySync(), defaultValue: -1 }); /** * Retrieves the used memory information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getUsedMemory(); * ``` */ const getUsedMemory = getUsedMemoryInternal; /** * Synchronous variant of {@link getUsedMemory}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getUsedMemorySync(); * ``` */ exports.getUsedMemory = getUsedMemory; const getUsedMemorySync = getUsedMemorySyncInternal; /** * Retrieves the user agent information reported by the native platform. * *![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getUserAgent(); * ``` */ exports.getUsedMemorySync = getUsedMemorySync; const getUserAgent = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoAsync)({ memoKey: 'userAgent', defaultValue: 'unknown', supportedPlatforms: ['android', 'ios', 'web'], getter: () => _nativeInterface.default.getUserAgent() }); /** * Synchronous variant of {@link getUserAgent}. * *![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ✅](https://img.shields.io/badge/Web-%E2%9C%85-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getUserAgentSync(); * ``` */ exports.getUserAgent = getUserAgent; const getUserAgentSync = () => (0, _supportedPlatformInfo.getSupportedPlatformInfoSync)({ memoKey: 'userAgentSync', defaultValue: 'unknown', supportedPlatforms: ['android', 'web'], getter: () => _nativeInterface.default.getUserAgentSync() }); exports.getUserAgentSync = getUserAgentSync; const [getFontScaleInternal, getFontScaleSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ supportedPlatforms: ['android', 'ios', 'windows'], getter: () => _nativeInterface.default.getFontScale(), syncGetter: () => _nativeInterface.default.getFontScaleSync(), defaultValue: -1 }); /** * Retrieves the font scale information reported by the native platform. * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = await getFontScale(); * ``` */ const getFontScale = getFontScaleInternal; /** * Synchronous variant of {@link getFontScale}. * * * **Compatibility:** ![iOS ✅](https://img.shields.io/badge/iOS-%E2%9C%85-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ✅](https://img.shields.io/badge/Windows-%E2%9C%85-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informational?labelColor=555555) * * @example * ```ts * const result = getFontScaleSync(); * ``` */ exports.getFontScale = getFontScale; const getFontScaleSync = getFontScaleSyncInternal; exports.getFontScaleSync = getFontScaleSync; const [getBootloaderInternal, getBootloaderSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'bootloader', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getBootloader(), syncGetter: () => _nativeInterface.default.getBootloaderSync(), defaultValue: 'unknown' }); /** * Retrieves the bootloader information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getBootloader(); * ``` */ const getBootloader = getBootloaderInternal; /** * Synchronous variant of {@link getBootloader}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getBootloaderSync(); * ``` */ exports.getBootloader = getBootloader; const getBootloaderSync = getBootloaderSyncInternal; exports.getBootloaderSync = getBootloaderSync; const [getDeviceInternal, getDeviceSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ getter: () => _nativeInterface.default.getDevice(), syncGetter: () => _nativeInterface.default.getDeviceSync(), defaultValue: 'unknown', memoKey: 'device', supportedPlatforms: ['android'] }); /** * Retrieves the device information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getDevice(); * ``` */ const getDevice = getDeviceInternal; /** * Synchronous variant of {@link getDevice}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getDeviceSync(); * ``` */ exports.getDevice = getDevice; const getDeviceSync = getDeviceSyncInternal; exports.getDeviceSync = getDeviceSync; const [getDisplayInternal, getDisplaySyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'display', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getDisplay(), syncGetter: () => _nativeInterface.default.getDisplaySync(), defaultValue: 'unknown' }); /** * Retrieves the display information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getDisplay(); * ``` */ const getDisplay = getDisplayInternal; /** * Synchronous variant of {@link getDisplay}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getDisplaySync(); * ``` */ exports.getDisplay = getDisplay; const getDisplaySync = getDisplaySyncInternal; exports.getDisplaySync = getDisplaySync; const [getFingerprintInternal, getFingerprintSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'fingerprint', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getFingerprint(), syncGetter: () => _nativeInterface.default.getFingerprintSync(), defaultValue: 'unknown' }); /** * Retrieves the fingerprint information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getFingerprint(); * ``` */ const getFingerprint = getFingerprintInternal; /** * Synchronous variant of {@link getFingerprint}. * * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = getFingerprintSync(); * ``` */ exports.getFingerprint = getFingerprint; const getFingerprintSync = getFingerprintSyncInternal; exports.getFingerprintSync = getFingerprintSync; const [getHardwareInternal, getHardwareSyncInternal] = (0, _supportedPlatformInfo.getSupportedPlatformInfoFunctions)({ memoKey: 'hardware', supportedPlatforms: ['android'], getter: () => _nativeInterface.default.getHardware(), syncGetter: () => _nativeInterface.default.getHardwareSync(), defaultValue: 'unknown' }); /** * Retrieves the hardware information reported by the native platform. * * **Compatibility:** ![iOS ❌](https://img.shields.io/badge/iOS-%E2%9D%8C-informational?labelColor=555555) ![Android ✅](https://img.shields.io/badge/Android-%E2%9C%85-informational?labelColor=555555) ![Windows ❌](https://img.shields.io/badge/Windows-%E2%9D%8C-informational?labelColor=555555) ![Web ❌](https://img.shields.io/badge/Web-%E2%9D%8C-informational?labelColor=555555) ![visionOS ❌](https://img.shields.io/badge/visionOS-%E2%9D%8C-informational?labelColor=555555) * * @example * ```ts * const result = await getHardware(); * ``` */ const getHardware = getHardwareInternal; /** * Synchronous variant of {@link getHardware}. * * * **Compa