/** * `react-native-device-info` (RNDI) drop-in compatibility layer. * * Exposes the public surface of `react-native-device-info@15.x` backed by this * package's native `DeviceInfoModule`, so an RNDI codebase compiles and runs * after only its import specifier is changed to * `react-native-nitro-device-info/compat`. * * Three usage shapes are supported simultaneously: * 1. Named function exports — `import { getModel } from '.../compat'` * 2. Default object — `import DeviceInfo from '.../compat'` * 3. Named hook exports — `import { useBatteryLevel } from '.../compat'` */ import { useBatteryLevel, useBatteryLevelIsLow, usePowerState, useBrightness } from '../hooks'; import type { AsyncHookResult, AppSetIdInfo, AvailableCapacityType, LocationProviderInfo, PowerState } from './transforms'; export declare const getUniqueId: () => Promise; export declare const getUniqueIdSync: () => string; export declare const syncUniqueId: () => Promise; export declare const getDeviceId: () => string; export declare const getModel: () => string; export declare const getBrand: () => string; export declare const getManufacturer: () => Promise; export declare const getManufacturerSync: () => string; export declare const getDeviceName: () => Promise; export declare const getDeviceNameSync: () => string; export declare const getDeviceType: () => string; export declare const getDeviceTypeSync: () => string; export declare const getSerialNumber: () => Promise; export declare const getSerialNumberSync: () => string; export declare const getAndroidId: () => Promise; export declare const getAndroidIdSync: () => string; export declare const getMacAddress: () => Promise; export declare const getMacAddressSync: () => string; /** * @remarks * Stub: this package has no Firebase Instance ID equivalent. Returns `'unknown'`, * matching RNDI's value when the deprecated Firebase IID path is unavailable. */ export declare const getInstanceId: () => Promise; /** * @remarks * Stub: see {@link getInstanceId}. Returns `'unknown'`. */ export declare const getInstanceIdSync: () => string; /** * @remarks * Stub: this package has no Google Play Services App Set ID equivalent. Returns * `{ id: 'unknown', scope: -1 }`, identical to RNDI's value when the optional * Play Services App Set dependency is absent. */ export declare const getAppSetId: () => Promise; export declare const getSystemName: () => string; export declare const getSystemVersion: () => string; export declare const getApiLevel: () => Promise; export declare const getApiLevelSync: () => number; export declare const getBuildId: () => Promise; export declare const getBuildIdSync: () => string; export declare const getBaseOs: () => Promise; export declare const getBaseOsSync: () => string; export declare const getBootloader: () => Promise; export declare const getBootloaderSync: () => string; export declare const getCodename: () => Promise; export declare const getCodenameSync: () => string; export declare const getDevice: () => Promise; export declare const getDeviceSync: () => string; export declare const getDisplay: () => Promise; export declare const getDisplaySync: () => string; export declare const getFingerprint: () => Promise; export declare const getFingerprintSync: () => string; export declare const getHardware: () => Promise; export declare const getHardwareSync: () => string; export declare const getHost: () => Promise; export declare const getHostSync: () => string; export declare const getProduct: () => Promise; export declare const getProductSync: () => string; export declare const getTags: () => Promise; export declare const getTagsSync: () => string; export declare const getType: () => Promise; export declare const getTypeSync: () => string; export declare const getIncremental: () => Promise; export declare const getIncrementalSync: () => string; export declare const getSecurityPatch: () => Promise; export declare const getSecurityPatchSync: () => string; export declare const getPreviewSdkInt: () => Promise; export declare const getPreviewSdkIntSync: () => number; export declare const getHostNames: () => Promise; export declare const getHostNamesSync: () => string[]; export declare const getVersion: () => string; export declare const getBuildNumber: () => string; export declare const getBundleId: () => string; export declare const getApplicationName: () => string; export declare const getReadableVersion: () => string; export declare const getInstallerPackageName: () => Promise; export declare const getInstallerPackageNameSync: () => string; export declare const getInstallReferrer: () => Promise; /** * @remarks * The install referrer is only available asynchronously on this package (Play * Services API). The sync variant returns `'unknown'`; use {@link getInstallReferrer} * for the real value. */ export declare const getInstallReferrerSync: () => string; export declare const getFirstInstallTime: () => Promise; export declare const getFirstInstallTimeSync: () => number; export declare const getLastUpdateTime: () => Promise; export declare const getLastUpdateTimeSync: () => number; /** * On iOS, use only to calculate absolute app-event timestamps (`8FFB.1`). * Do not display, collect, or transmit the raw boot timestamp as device information. */ export declare const getStartupTime: () => Promise; /** See {@link getStartupTime} for the iOS usage restriction. */ export declare const getStartupTimeSync: () => number; export declare const isEmulator: () => Promise; export declare const isEmulatorSync: () => boolean; export declare const isTablet: () => boolean; export declare const isLowRamDevice: () => boolean; export declare const isDisplayZoomed: () => boolean; export declare const isPinOrFingerprintSet: () => Promise; export declare const isPinOrFingerprintSetSync: () => boolean; export declare const isCameraPresent: () => Promise; export declare const isCameraPresentSync: () => boolean; export declare const hasNotch: () => boolean; export declare const hasDynamicIsland: () => boolean; export declare const hasGms: () => Promise; export declare const hasGmsSync: () => boolean; export declare const hasHms: () => Promise; export declare const hasHmsSync: () => boolean; export declare const hasSystemFeature: (feature: string) => Promise; export declare const hasSystemFeatureSync: (feature: string) => boolean; export declare const getSystemAvailableFeatures: () => Promise; export declare const getSystemAvailableFeaturesSync: () => string[]; export declare const getSupportedMediaTypeList: () => Promise; export declare const getSupportedMediaTypeListSync: () => string[]; export declare const isLandscape: () => Promise; export declare const isLandscapeSync: () => boolean; export declare const isTabletMode: () => Promise; export declare const isMouseConnected: () => Promise; export declare const isMouseConnectedSync: () => boolean; export declare const isKeyboardConnected: () => Promise; export declare const isKeyboardConnectedSync: () => boolean; export declare const supportedAbis: () => Promise; export declare const supportedAbisSync: () => string[]; export declare const supported32BitAbis: () => Promise; export declare const supported32BitAbisSync: () => string[]; export declare const supported64BitAbis: () => Promise; export declare const supported64BitAbisSync: () => string[]; export declare const getTotalMemory: () => Promise; export declare const getTotalMemorySync: () => number; export declare const getUsedMemory: () => Promise; export declare const getUsedMemorySync: () => number; export declare const getMaxMemory: () => Promise; export declare const getMaxMemorySync: () => number; export declare const getTotalDiskCapacity: () => Promise; export declare const getTotalDiskCapacitySync: () => number; export declare const getTotalDiskCapacityOld: () => Promise; export declare const getTotalDiskCapacityOldSync: () => number; /** * @remarks * The `storageType` argument is accepted for RNDI signature parity but ignored; * this package has no per-bucket (iOS) storage query. */ export declare const getFreeDiskStorage: (_storageType?: AvailableCapacityType) => Promise; /** * @remarks * See {@link getFreeDiskStorage}: `storageType` is accepted and ignored. */ export declare const getFreeDiskStorageSync: (_storageType?: AvailableCapacityType) => number; export declare const getFreeDiskStorageOld: () => Promise; export declare const getFreeDiskStorageOldSync: () => number; export declare const getBatteryLevel: () => Promise; export declare const getBatteryLevelSync: () => number; export declare const getPowerState: () => Promise>; export declare const getPowerStateSync: () => Partial; export declare const isBatteryCharging: () => Promise; export declare const isBatteryChargingSync: () => boolean; export declare const isLowBatteryLevel: (level: number) => boolean; export declare const getIpAddress: () => Promise; export declare const getIpAddressSync: () => string; export declare const getCarrier: () => Promise; export declare const getCarrierSync: () => string; export declare const isAirplaneMode: () => Promise; export declare const isAirplaneModeSync: () => boolean; export declare const getUserAgent: () => Promise; /** * @remarks * The user agent is only available asynchronously on this package (iOS WebView * init). The sync variant returns `''`; use {@link getUserAgent} for the real value. */ export declare const getUserAgentSync: () => string; export declare const isHeadphonesConnected: () => Promise; export declare const isHeadphonesConnectedSync: () => boolean; export declare const isWiredHeadphonesConnected: () => Promise; export declare const isWiredHeadphonesConnectedSync: () => boolean; export declare const isBluetoothHeadphonesConnected: () => Promise; export declare const isBluetoothHeadphonesConnectedSync: () => boolean; export declare const isLocationEnabled: () => Promise; export declare const isLocationEnabledSync: () => boolean; export declare const getAvailableLocationProviders: () => Promise; export declare const getAvailableLocationProvidersSync: () => LocationProviderInfo; export declare const getFontScale: () => Promise; export declare const getFontScaleSync: () => number; export declare const getBrightness: () => Promise; export declare const getBrightnessSync: () => number; export declare const getDeviceToken: () => Promise; export { useBatteryLevel, useBatteryLevelIsLow, usePowerState, useBrightness, }; /** * RNDI returns `AsyncHookResult`; the core hook returns a bare boolean. */ export declare function useIsHeadphonesConnected(): AsyncHookResult; /** * RNDI returns `AsyncHookResult`; the core hook returns a bare boolean. */ export declare function useIsWiredHeadphonesConnected(): AsyncHookResult; /** * RNDI returns `AsyncHookResult`; the core hook returns a bare boolean. */ export declare function useIsBluetoothHeadphonesConnected(): AsyncHookResult; /** * Built in JS over `DeviceInfoModule.getFirstInstallTime()` (no core hook exists). */ export declare function useFirstInstallTime(): AsyncHookResult; /** * Built in JS over `DeviceInfoModule.deviceName` (no core hook exists). */ export declare function useDeviceName(): AsyncHookResult; /** * Built in JS over `DeviceInfoModule.hasSystemFeature()` (no core hook exists). */ export declare function useHasSystemFeature(feature: string): AsyncHookResult; /** * Built in JS over `DeviceInfoModule.isEmulator` (no core hook exists). */ export declare function useIsEmulator(): AsyncHookResult; /** * Built in JS over `DeviceInfoModule.manufacturer` (no core hook exists). */ export declare function useManufacturer(): AsyncHookResult; /** * Aggregate object matching RNDI's default `DeviceInfo` export. Every named * function plus every hook is reachable as a method, e.g. `DeviceInfo.getModel()`. */ declare const DeviceInfo: { getUniqueId: () => Promise; getUniqueIdSync: () => string; syncUniqueId: () => Promise; getDeviceId: () => string; getModel: () => string; getBrand: () => string; getManufacturer: () => Promise; getManufacturerSync: () => string; getDeviceName: () => Promise; getDeviceNameSync: () => string; getDeviceType: () => string; getDeviceTypeSync: () => string; getSerialNumber: () => Promise; getSerialNumberSync: () => string; getAndroidId: () => Promise; getAndroidIdSync: () => string; getMacAddress: () => Promise; getMacAddressSync: () => string; getInstanceId: () => Promise; getInstanceIdSync: () => string; getAppSetId: () => Promise; getSystemName: () => string; getSystemVersion: () => string; getApiLevel: () => Promise; getApiLevelSync: () => number; getBuildId: () => Promise; getBuildIdSync: () => string; getBaseOs: () => Promise; getBaseOsSync: () => string; getBootloader: () => Promise; getBootloaderSync: () => string; getCodename: () => Promise; getCodenameSync: () => string; getDevice: () => Promise; getDeviceSync: () => string; getDisplay: () => Promise; getDisplaySync: () => string; getFingerprint: () => Promise; getFingerprintSync: () => string; getHardware: () => Promise; getHardwareSync: () => string; getHost: () => Promise; getHostSync: () => string; getProduct: () => Promise; getProductSync: () => string; getTags: () => Promise; getTagsSync: () => string; getType: () => Promise; getTypeSync: () => string; getIncremental: () => Promise; getIncrementalSync: () => string; getSecurityPatch: () => Promise; getSecurityPatchSync: () => string; getPreviewSdkInt: () => Promise; getPreviewSdkIntSync: () => number; getHostNames: () => Promise; getHostNamesSync: () => string[]; getVersion: () => string; getBuildNumber: () => string; getBundleId: () => string; getApplicationName: () => string; getReadableVersion: () => string; getInstallerPackageName: () => Promise; getInstallerPackageNameSync: () => string; getInstallReferrer: () => Promise; getInstallReferrerSync: () => string; getFirstInstallTime: () => Promise; getFirstInstallTimeSync: () => number; getLastUpdateTime: () => Promise; getLastUpdateTimeSync: () => number; getStartupTime: () => Promise; getStartupTimeSync: () => number; isEmulator: () => Promise; isEmulatorSync: () => boolean; isTablet: () => boolean; isLowRamDevice: () => boolean; isDisplayZoomed: () => boolean; isPinOrFingerprintSet: () => Promise; isPinOrFingerprintSetSync: () => boolean; isCameraPresent: () => Promise; isCameraPresentSync: () => boolean; hasNotch: () => boolean; hasDynamicIsland: () => boolean; hasGms: () => Promise; hasGmsSync: () => boolean; hasHms: () => Promise; hasHmsSync: () => boolean; hasSystemFeature: (feature: string) => Promise; hasSystemFeatureSync: (feature: string) => boolean; getSystemAvailableFeatures: () => Promise; getSystemAvailableFeaturesSync: () => string[]; getSupportedMediaTypeList: () => Promise; getSupportedMediaTypeListSync: () => string[]; isLandscape: () => Promise; isLandscapeSync: () => boolean; isTabletMode: () => Promise; isMouseConnected: () => Promise; isMouseConnectedSync: () => boolean; isKeyboardConnected: () => Promise; isKeyboardConnectedSync: () => boolean; supportedAbis: () => Promise; supportedAbisSync: () => string[]; supported32BitAbis: () => Promise; supported32BitAbisSync: () => string[]; supported64BitAbis: () => Promise; supported64BitAbisSync: () => string[]; getTotalMemory: () => Promise; getTotalMemorySync: () => number; getUsedMemory: () => Promise; getUsedMemorySync: () => number; getMaxMemory: () => Promise; getMaxMemorySync: () => number; getTotalDiskCapacity: () => Promise; getTotalDiskCapacitySync: () => number; getTotalDiskCapacityOld: () => Promise; getTotalDiskCapacityOldSync: () => number; getFreeDiskStorage: (_storageType?: AvailableCapacityType) => Promise; getFreeDiskStorageSync: (_storageType?: AvailableCapacityType) => number; getFreeDiskStorageOld: () => Promise; getFreeDiskStorageOldSync: () => number; getBatteryLevel: () => Promise; getBatteryLevelSync: () => number; getPowerState: () => Promise>; getPowerStateSync: () => Partial; isBatteryCharging: () => Promise; isBatteryChargingSync: () => boolean; isLowBatteryLevel: (level: number) => boolean; getIpAddress: () => Promise; getIpAddressSync: () => string; getCarrier: () => Promise; getCarrierSync: () => string; isAirplaneMode: () => Promise; isAirplaneModeSync: () => boolean; getUserAgent: () => Promise; getUserAgentSync: () => string; isHeadphonesConnected: () => Promise; isHeadphonesConnectedSync: () => boolean; isWiredHeadphonesConnected: () => Promise; isWiredHeadphonesConnectedSync: () => boolean; isBluetoothHeadphonesConnected: () => Promise; isBluetoothHeadphonesConnectedSync: () => boolean; isLocationEnabled: () => Promise; isLocationEnabledSync: () => boolean; getAvailableLocationProviders: () => Promise; getAvailableLocationProvidersSync: () => LocationProviderInfo; getFontScale: () => Promise; getFontScaleSync: () => number; getBrightness: () => Promise; getBrightnessSync: () => number; getDeviceToken: () => Promise; useBatteryLevel: typeof useBatteryLevel; useBatteryLevelIsLow: typeof useBatteryLevelIsLow; usePowerState: typeof usePowerState; useBrightness: typeof useBrightness; useIsHeadphonesConnected: typeof useIsHeadphonesConnected; useIsWiredHeadphonesConnected: typeof useIsWiredHeadphonesConnected; useIsBluetoothHeadphonesConnected: typeof useIsBluetoothHeadphonesConnected; useFirstInstallTime: typeof useFirstInstallTime; useDeviceName: typeof useDeviceName; useHasSystemFeature: typeof useHasSystemFeature; useIsEmulator: typeof useIsEmulator; useManufacturer: typeof useManufacturer; }; export type { AsyncHookResult, AppSetIdInfo, AvailableCapacityType, LocationProviderInfo, PowerState, }; /** * Named alias of the aggregate object. RNDI exports `DeviceInfo` both as the * default and as a named const, so `import { DeviceInfo } from '.../compat'` * also resolves. */ export { DeviceInfo }; export default DeviceInfo; //# sourceMappingURL=index.d.ts.map