react-native-device-info
- Version 15.0.2
- Published
- 1.4 MB
- No dependencies
- MIT license
Install
npm i react-native-device-infoyarn add react-native-device-infopnpm add react-native-device-infoOverview
Get device information using react-native
Index
Variables
- DeviceInfo
- getAndroidId
- getAndroidIdSync
- getApiLevel
- getApiLevelSync
- getAvailableLocationProviders
- getAvailableLocationProvidersSync
- getBaseOs
- getBaseOsSync
- getBatteryLevel
- getBatteryLevelSync
- getBootloader
- getBootloaderSync
- getBrightness
- getBrightnessSync
- getBuildId
- getBuildIdSync
- getCarrier
- getCarrierSync
- getCodename
- getCodenameSync
- getDevice
- getDeviceName
- getDeviceNameSync
- getDeviceSync
- getDisplay
- getDisplaySync
- getFingerprint
- getFingerprintSync
- getFirstInstallTime
- getFirstInstallTimeSync
- getFontScale
- getFontScaleSync
- getFreeDiskStorage
- getFreeDiskStorageSync
- getHardware
- getHardwareSync
- getHost
- getHostNames
- getHostNamesSync
- getHostSync
- getIncremental
- getIncrementalSync
- getInstallerPackageName
- getInstallerPackageNameSync
- getInstallReferrer
- getInstallReferrerSync
- getInstanceId
- getInstanceIdSync
- getIpAddress
- getIpAddressSync
- getLastUpdateTime
- getLastUpdateTimeSync
- getManufacturer
- getManufacturerSync
- getMaxMemory
- getMaxMemorySync
- getPowerState
- getPowerStateSync
- getPreviewSdkInt
- getPreviewSdkIntSync
- getProduct
- getProductSync
- getSecurityPatch
- getSecurityPatchSync
- getSerialNumber
- getSerialNumberSync
- getStartupTime
- getStartupTimeSync
- getSupportedMediaTypeList
- getSupportedMediaTypeListSync
- getSystemAvailableFeatures
- getSystemAvailableFeaturesSync
- getTags
- getTagsSync
- getTotalDiskCapacity
- getTotalDiskCapacitySync
- getTotalMemory
- getTotalMemorySync
- getType
- getTypeSync
- getUniqueId
- getUniqueIdSync
- getUsedMemory
- getUsedMemorySync
- hasGms
- hasGmsSync
- hasHms
- hasHmsSync
- isAirplaneMode
- isAirplaneModeSync
- isBatteryCharging
- isBatteryChargingSync
- isBluetoothHeadphonesConnected
- isBluetoothHeadphonesConnectedSync
- isCameraPresent
- isCameraPresentSync
- isEmulator
- isEmulatorSync
- isHeadphonesConnected
- isHeadphonesConnectedSync
- isKeyboardConnected
- isKeyboardConnectedSync
- isLocationEnabled
- isLocationEnabledSync
- isMouseConnected
- isMouseConnectedSync
- isPinOrFingerprintSet
- isPinOrFingerprintSetSync
- isWiredHeadphonesConnected
- isWiredHeadphonesConnectedSync
- supported32BitAbis
- supported32BitAbisSync
- supported64BitAbis
- supported64BitAbisSync
- supportedAbis
- supportedAbisSync
Functions
- getApplicationName()
- getAppSetId()
- getBrand()
- getBuildNumber()
- getBundleId()
- getDeviceId()
- getDeviceToken()
- getDeviceType()
- getDeviceTypeSync()
- getFreeDiskStorageOld()
- getFreeDiskStorageOldSync()
- getMacAddress()
- getMacAddressSync()
- getModel()
- getReadableVersion()
- getSystemName()
- getSystemVersion()
- getTotalDiskCapacityOld()
- getTotalDiskCapacityOldSync()
- getUserAgent()
- getUserAgentSync()
- getVersion()
- hasDynamicIsland()
- hasNotch()
- hasSystemFeature()
- hasSystemFeatureSync()
- isDisplayZoomed()
- isLandscape()
- isLandscapeSync()
- isLowBatteryLevel()
- isLowRamDevice()
- isTablet()
- isTabletMode()
- syncUniqueId()
- useBatteryLevel()
- useBatteryLevelIsLow()
- useBrightness()
- useDeviceName()
- useFirstInstallTime()
- useHasSystemFeature()
- useIsBluetoothHeadphonesConnected()
- useIsEmulator()
- useIsHeadphonesConnected()
- useIsWiredHeadphonesConnected()
- useManufacturer()
- usePowerState()
Interfaces
Type Aliases
Variables
variable DeviceInfo
const DeviceInfo: DeviceInfoModule;CommonJS-style namespace that aggregates every exported API from this module.
variable getAndroidId
const getAndroidId: Getter<Promise<string>>;Retrieves the Android ID information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getAndroidId();
variable getAndroidIdSync
const getAndroidIdSync: Getter<string>;Synchronous variant of getAndroidId.
**Compatibility:**     
Example 1
const result = getAndroidIdSync();
variable getApiLevel
const getApiLevel: Getter<Promise<number>>;Retrieves the API level information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getApiLevel();
variable getApiLevelSync
const getApiLevelSync: Getter<number>;Synchronous variant of getApiLevel.
**Compatibility:**     
Example 1
const result = getApiLevelSync();
variable getAvailableLocationProviders
const getAvailableLocationProviders: Getter<Promise<LocationProviderInfo>>;Retrieves the available location providers information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getAvailableLocationProviders();
variable getAvailableLocationProvidersSync
const getAvailableLocationProvidersSync: Getter<LocationProviderInfo>;Synchronous variant of getAvailableLocationProviders.
**Compatibility:**     
Example 1
const result = getAvailableLocationProvidersSync();
variable getBaseOs
const getBaseOs: Getter<Promise<string>>;Retrieves the base OS information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getBaseOs();
variable getBaseOsSync
const getBaseOsSync: Getter<string>;Synchronous variant of getBaseOs.
**Compatibility:**     
Example 1
const result = getBaseOsSync();
variable getBatteryLevel
const getBatteryLevel: Getter<Promise<number>>;Retrieves the battery level information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getBatteryLevel();
variable getBatteryLevelSync
const getBatteryLevelSync: Getter<number>;Synchronous variant of getBatteryLevel.
**Compatibility:**     
Example 1
const result = getBatteryLevelSync();
variable getBootloader
const getBootloader: Getter<Promise<string>>;Retrieves the bootloader information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getBootloader();
variable getBootloaderSync
const getBootloaderSync: Getter<string>;Synchronous variant of getBootloader.
**Compatibility:**     
Example 1
const result = getBootloaderSync();
variable getBrightness
const getBrightness: Getter<Promise<number>>;Retrieves the brightness information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getBrightness();
variable getBrightnessSync
const getBrightnessSync: Getter<number>;Synchronous variant of getBrightness.
**Compatibility:**     
Example 1
const result = getBrightnessSync();
variable getBuildId
const getBuildId: Getter<Promise<string>>;Retrieves the build ID information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getBuildId();
variable getBuildIdSync
const getBuildIdSync: Getter<string>;Synchronous variant of getBuildId.
**Compatibility:**     
Example 1
const result = getBuildIdSync();
variable getCarrier
const getCarrier: Getter<Promise<string>>;Retrieves the carrier information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getCarrier();
variable getCarrierSync
const getCarrierSync: Getter<string>;Synchronous variant of getCarrier.
**Compatibility:**     
Example 1
const result = getCarrierSync();
variable getCodename
const getCodename: Getter<Promise<string>>;Retrieves the codename information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getCodename();
variable getCodenameSync
const getCodenameSync: Getter<string>;Synchronous variant of getCodename.
**Compatibility:**     
Example 1
const result = getCodenameSync();
variable getDevice
const getDevice: Getter<Promise<string>>;Retrieves the device information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getDevice();
variable getDeviceName
const getDeviceName: Getter<Promise<string>>;Retrieves the device name information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getDeviceName();
variable getDeviceNameSync
const getDeviceNameSync: Getter<string>;Synchronous variant of getDeviceName.
**Compatibility:**     
Example 1
const result = getDeviceNameSync();
variable getDeviceSync
const getDeviceSync: Getter<string>;Synchronous variant of getDevice.
**Compatibility:**     
Example 1
const result = getDeviceSync();
variable getDisplay
const getDisplay: Getter<Promise<string>>;Retrieves the display information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getDisplay();
variable getDisplaySync
const getDisplaySync: Getter<string>;Synchronous variant of getDisplay.
**Compatibility:**     
Example 1
const result = getDisplaySync();
variable getFingerprint
const getFingerprint: Getter<Promise<string>>;Retrieves the fingerprint information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getFingerprint();
variable getFingerprintSync
const getFingerprintSync: Getter<string>;Synchronous variant of getFingerprint.
**Compatibility:**     
Example 1
const result = getFingerprintSync();
variable getFirstInstallTime
const getFirstInstallTime: Getter<Promise<number>>;Retrieves the first install time information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getFirstInstallTime();
variable getFirstInstallTimeSync
const getFirstInstallTimeSync: Getter<number>;Synchronous variant of getFirstInstallTime.
**Compatibility:**     
Example 1
const result = getFirstInstallTimeSync();
variable getFontScale
const getFontScale: Getter<Promise<number>>;Retrieves the font scale information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getFontScale();
variable getFontScaleSync
const getFontScaleSync: Getter<number>;Synchronous variant of getFontScale.
**Compatibility:**     
Example 1
const result = getFontScaleSync();
variable getFreeDiskStorage
const getFreeDiskStorage: Getter<Promise<number>>;Retrieves the free disk storage information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getFreeDiskStorage();
variable getFreeDiskStorageSync
const getFreeDiskStorageSync: Getter<number>;Synchronous variant of getFreeDiskStorage.
**Compatibility:**     
Example 1
const result = getFreeDiskStorageSync();
variable getHardware
const getHardware: Getter<Promise<string>>;Retrieves the hardware information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getHardware();
variable getHardwareSync
const getHardwareSync: Getter<string>;Synchronous variant of getHardware.
**Compatibility:**     
Example 1
const result = getHardwareSync();
variable getHost
const getHost: Getter<Promise<string>>;Retrieves the host information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getHost();
variable getHostNames
const getHostNames: Getter<Promise<string[]>>;Retrieves the host names information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getHostNames();
variable getHostNamesSync
const getHostNamesSync: Getter<string[]>;Synchronous variant of getHostNames.
**Compatibility:**     
Example 1
const result = getHostNamesSync();
variable getHostSync
const getHostSync: Getter<string>;Synchronous variant of getHost.
**Compatibility:**     
Example 1
const result = getHostSync();
variable getIncremental
const getIncremental: Getter<Promise<string>>;Retrieves the incremental information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getIncremental();
variable getIncrementalSync
const getIncrementalSync: Getter<string>;Synchronous variant of getIncremental.
**Compatibility:**     
Example 1
const result = getIncrementalSync();
variable getInstallerPackageName
const getInstallerPackageName: Getter<Promise<string>>;Retrieves the installer package name information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getInstallerPackageName();
variable getInstallerPackageNameSync
const getInstallerPackageNameSync: Getter<string>;Synchronous variant of getInstallerPackageName.
**Compatibility:**     
Example 1
const result = getInstallerPackageNameSync();
variable getInstallReferrer
const getInstallReferrer: Getter<Promise<string>>;Retrieves the install referrer information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getInstallReferrer();
variable getInstallReferrerSync
const getInstallReferrerSync: Getter<string>;Synchronous variant of getInstallReferrer.
**Compatibility:**     
Example 1
const result = getInstallReferrerSync();
variable getInstanceId
const getInstanceId: Getter<Promise<string>>;Retrieves the instance ID information reported by the native platform.
Example 1
const result = await getInstanceId();
variable getInstanceIdSync
const getInstanceIdSync: Getter<string>;Synchronous variant of getInstanceId.
**Compatibility:**     
Example 1
const result = getInstanceIdSync();
variable getIpAddress
const getIpAddress: Getter<Promise<string>>;Retrieves the IP address information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getIpAddress();
variable getIpAddressSync
const getIpAddressSync: Getter<string>;Synchronous variant of getIpAddress.
**Compatibility:**     
Example 1
const result = getIpAddressSync();
variable getLastUpdateTime
const getLastUpdateTime: Getter<Promise<number>>;Retrieves the last update time information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getLastUpdateTime();
variable getLastUpdateTimeSync
const getLastUpdateTimeSync: Getter<number>;Synchronous variant of getLastUpdateTime.
**Compatibility:**     
Example 1
const result = getLastUpdateTimeSync();
variable getManufacturer
const getManufacturer: Getter<Promise<string>>;Retrieves the manufacturer information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getManufacturer();
variable getManufacturerSync
const getManufacturerSync: Getter<string>;Synchronous variant of getManufacturer.
**Compatibility:**     
Example 1
const result = getManufacturerSync();
variable getMaxMemory
const getMaxMemory: Getter<Promise<number>>;Retrieves the max memory information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getMaxMemory();
variable getMaxMemorySync
const getMaxMemorySync: Getter<number>;Synchronous variant of getMaxMemory.
**Compatibility:**     
Example 1
const result = getMaxMemorySync();
variable getPowerState
const getPowerState: Getter<Promise<Partial<PowerState>>>;Retrieves the power state information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getPowerState();
variable getPowerStateSync
const getPowerStateSync: Getter<Partial<PowerState>>;Synchronous variant of getPowerState.
**Compatibility:**     
Example 1
const result = getPowerStateSync();
variable getPreviewSdkInt
const getPreviewSdkInt: Getter<Promise<number>>;Retrieves the preview SDK int information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getPreviewSdkInt();
variable getPreviewSdkIntSync
const getPreviewSdkIntSync: Getter<number>;Synchronous variant of getPreviewSdkInt.
**Compatibility:**     
Example 1
const result = getPreviewSdkIntSync();
variable getProduct
const getProduct: Getter<Promise<string>>;Retrieves the product information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getProduct();
variable getProductSync
const getProductSync: Getter<string>;Synchronous variant of getProduct.
**Compatibility:**     
Example 1
const result = getProductSync();
variable getSecurityPatch
const getSecurityPatch: Getter<Promise<string>>;Retrieves the security patch information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getSecurityPatch();
variable getSecurityPatchSync
const getSecurityPatchSync: Getter<string>;Synchronous variant of getSecurityPatch.
**Compatibility:**     
Example 1
const result = getSecurityPatchSync();
variable getSerialNumber
const getSerialNumber: Getter<Promise<string>>;Retrieves the serial number information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getSerialNumber();
variable getSerialNumberSync
const getSerialNumberSync: Getter<string>;Synchronous variant of getSerialNumber.
**Compatibility:**     
Example 1
const result = getSerialNumberSync();
variable getStartupTime
const getStartupTime: Getter<Promise<number>>;Retrieves the startup time information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getStartupTime();
variable getStartupTimeSync
const getStartupTimeSync: Getter<number>;Synchronous variant of getStartupTime.
**Compatibility:**     
Example 1
const result = getStartupTimeSync();
variable getSupportedMediaTypeList
const getSupportedMediaTypeList: Getter<Promise<string[]>>;Retrieves the supported media type list information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getSupportedMediaTypeList();
variable getSupportedMediaTypeListSync
const getSupportedMediaTypeListSync: Getter<string[]>;Synchronous variant of getSupportedMediaTypeList.
**Compatibility:**     
Example 1
const result = getSupportedMediaTypeListSync();
variable getSystemAvailableFeatures
const getSystemAvailableFeatures: Getter<Promise<string[]>>;Retrieves the system available features information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getSystemAvailableFeatures();
variable getSystemAvailableFeaturesSync
const getSystemAvailableFeaturesSync: Getter<string[]>;Synchronous variant of getSystemAvailableFeatures.
**Compatibility:**     
Example 1
const result = getSystemAvailableFeaturesSync();
variable getTags
const getTags: Getter<Promise<string>>;Retrieves the tags information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getTags();
variable getTagsSync
const getTagsSync: Getter<string>;Synchronous variant of getTags.
**Compatibility:**     
Example 1
const result = getTagsSync();
variable getTotalDiskCapacity
const getTotalDiskCapacity: Getter<Promise<number>>;Retrieves the total disk capacity information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getTotalDiskCapacity();
variable getTotalDiskCapacitySync
const getTotalDiskCapacitySync: Getter<number>;Synchronous variant of getTotalDiskCapacity.
**Compatibility:**     
Example 1
const result = getTotalDiskCapacitySync();
variable getTotalMemory
const getTotalMemory: Getter<Promise<number>>;Retrieves the total memory information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getTotalMemory();
variable getTotalMemorySync
const getTotalMemorySync: Getter<number>;Synchronous variant of getTotalMemory.
**Compatibility:**     
Example 1
const result = getTotalMemorySync();
variable getType
const getType: Getter<Promise<string>>;Retrieves the type information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getType();
variable getTypeSync
const getTypeSync: Getter<string>;Synchronous variant of getType.
**Compatibility:**     
Example 1
const result = getTypeSync();
variable getUniqueId
const getUniqueId: Getter<Promise<string>>;Retrieves the unique ID information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getUniqueId();
variable getUniqueIdSync
const getUniqueIdSync: Getter<string>;Synchronous variant of getUniqueId.
**Compatibility:**     
Example 1
const result = getUniqueIdSync();
variable getUsedMemory
const getUsedMemory: Getter<Promise<number>>;Retrieves the used memory information reported by the native platform.
**Compatibility:**     
Example 1
const result = await getUsedMemory();
variable getUsedMemorySync
const getUsedMemorySync: Getter<number>;Synchronous variant of getUsedMemory.
**Compatibility:**     
Example 1
const result = getUsedMemorySync();
variable hasGms
const hasGms: Getter<Promise<boolean>>;Reports whether the device has GMS support.
    
Example 1
const result = await hasGms();
variable hasGmsSync
const hasGmsSync: Getter<boolean>;Synchronous variant of hasGms.
Example 1
const result = hasGmsSync();
variable hasHms
const hasHms: Getter<Promise<boolean>>;Reports whether the device has HMS support.
**Compatibility:**     
Example 1
const result = await hasHms();
variable hasHmsSync
const hasHmsSync: Getter<boolean>;Synchronous variant of hasHms.
**Compatibility:**     
Example 1
const result = hasHmsSync();
variable isAirplaneMode
const isAirplaneMode: Getter<Promise<boolean>>;Returns true when the platform reports airplane mode is enabled.
**Compatibility:**     
Example 1
const result = await isAirplaneMode();
variable isAirplaneModeSync
const isAirplaneModeSync: Getter<boolean>;Synchronous variant of isAirplaneMode.
**Compatibility:**     
Example 1
const result = isAirplaneModeSync();
variable isBatteryCharging
const isBatteryCharging: Getter<Promise<boolean>>;Returns true while the device battery is actively charging.
**Compatibility:**     
Example 1
const result = await isBatteryCharging();
variable isBatteryChargingSync
const isBatteryChargingSync: Getter<boolean>;Synchronous variant of isBatteryCharging.
**Compatibility:**     
Example 1
const result = isBatteryChargingSync();
variable isBluetoothHeadphonesConnected
const isBluetoothHeadphonesConnected: Getter<Promise<boolean>>;Returns true when Bluetooth headphones are connected.
**Compatibility:**     
Example 1
const result = await isBluetoothHeadphonesConnected();
variable isBluetoothHeadphonesConnectedSync
const isBluetoothHeadphonesConnectedSync: Getter<boolean>;Synchronous variant of isBluetoothHeadphonesConnected.
**Compatibility:**     
Example 1
const result = isBluetoothHeadphonesConnectedSync();
variable isCameraPresent
const isCameraPresent: Getter<Promise<boolean>>;Returns true when at least one hardware camera is available on the device.
**Compatibility:**     
Example 1
const result = await isCameraPresent();
variable isCameraPresentSync
const isCameraPresentSync: Getter<boolean>;Synchronous variant of isCameraPresent.
**Compatibility:**     
Example 1
const result = isCameraPresentSync();
variable isEmulator
const isEmulator: Getter<Promise<boolean>>;Returns true when the current runtime is an emulator or simulator.
**Compatibility:**     
Example 1
const result = await isEmulator();
variable isEmulatorSync
const isEmulatorSync: Getter<boolean>;Synchronous variant of isEmulator.
**Compatibility:**     
Example 1
const result = isEmulatorSync();
variable isHeadphonesConnected
const isHeadphonesConnected: Getter<Promise<boolean>>;Returns true when any headphones are connected to the device.
**Compatibility:**     
Example 1
const result = await isHeadphonesConnected();
variable isHeadphonesConnectedSync
const isHeadphonesConnectedSync: Getter<boolean>;Synchronous variant of isHeadphonesConnected.
**Compatibility:**     
Example 1
const result = isHeadphonesConnectedSync();
variable isKeyboardConnected
const isKeyboardConnected: Getter<Promise<boolean>>;Returns true when a hardware keyboard is connected (Windows).
**Compatibility:**     
Example 1
const result = await isKeyboardConnected();
variable isKeyboardConnectedSync
const isKeyboardConnectedSync: Getter<boolean>;Synchronous variant of isKeyboardConnected.
**Compatibility:**     
Example 1
const result = isKeyboardConnectedSync();
variable isLocationEnabled
const isLocationEnabled: Getter<Promise<boolean>>;Returns true when the system-wide location services switch is enabled.
**Compatibility:**     
Example 1
const result = await isLocationEnabled();
variable isLocationEnabledSync
const isLocationEnabledSync: Getter<boolean>;Synchronous variant of isLocationEnabled.
**Compatibility:**     
Example 1
const result = isLocationEnabledSync();
variable isMouseConnected
const isMouseConnected: Getter<Promise<boolean>>;Returns true when a pointing device is connected (Windows).
**Compatibility:**     
Example 1
const result = await isMouseConnected();
variable isMouseConnectedSync
const isMouseConnectedSync: Getter<boolean>;Synchronous variant of isMouseConnected.
**Compatibility:**     
Example 1
const result = isMouseConnectedSync();
variable isPinOrFingerprintSet
const isPinOrFingerprintSet: Getter<Promise<boolean>>;Returns true when the user has configured any secure lock method such as a PIN or biometric.
**Compatibility:**     
Example 1
const result = await isPinOrFingerprintSet();
variable isPinOrFingerprintSetSync
const isPinOrFingerprintSetSync: Getter<boolean>;Synchronous variant of isPinOrFingerprintSet.
**Compatibility:**     
Example 1
const result = isPinOrFingerprintSetSync();
variable isWiredHeadphonesConnected
const isWiredHeadphonesConnected: Getter<Promise<boolean>>;Returns true when wired headphones are detected.
    
Example 1
const result = await isWiredHeadphonesConnected();
variable isWiredHeadphonesConnectedSync
const isWiredHeadphonesConnectedSync: Getter<boolean>;Synchronous variant of isWiredHeadphonesConnected.
Example 1
const result = isWiredHeadphonesConnectedSync();
variable supported32BitAbis
const supported32BitAbis: Getter<Promise<string[]>>;Lists the supported 32 bit ABIs reported by the native platform.
**Compatibility:**     
Example 1
const result = await supported32BitAbis();
variable supported32BitAbisSync
const supported32BitAbisSync: Getter<string[]>;Synchronous variant of supported32BitAbis.
**Compatibility:**     
Example 1
const result = supported32BitAbisSync();
variable supported64BitAbis
const supported64BitAbis: Getter<Promise<string[]>>;Lists the supported 64 bit ABIs reported by the native platform.
**Compatibility:**     
Example 1
const result = await supported64BitAbis();
variable supported64BitAbisSync
const supported64BitAbisSync: Getter<string[]>;Synchronous variant of supported64BitAbis.
**Compatibility:**     
Example 1
const result = supported64BitAbisSync();
variable supportedAbis
const supportedAbis: Getter<Promise<string[]>>;Lists the supported ABIs reported by the native platform.
**Compatibility:**     
Example 1
const result = await supportedAbis();
variable supportedAbisSync
const supportedAbisSync: Getter<string[]>;Synchronous variant of supportedAbis.
**Compatibility:**     
Example 1
const result = supportedAbisSync();
Functions
function getApplicationName
getApplicationName: () => string;Retrieves the application name information reported by the native platform.
    
Example 1
const result = getApplicationName();
function getAppSetId
getAppSetId: () => Promise<{ id: string; scope: number }>;Retrieves the app set ID information reported by the native platform.
    
Example 1
const result = await getAppSetId();
function getBrand
getBrand: () => string;Retrieves the brand information reported by the native platform.
    
Example 1
const result = getBrand();
function getBuildNumber
getBuildNumber: () => string;Retrieves the build number information reported by the native platform.
    
Example 1
const result = getBuildNumber();
function getBundleId
getBundleId: () => string;Retrieves the bundle ID information reported by the native platform.
    
Example 1
const result = getBundleId();
function getDeviceId
getDeviceId: () => string;Retrieves the device ID information reported by the native platform.
    
Example 1
const result = getDeviceId();
function getDeviceToken
getDeviceToken: () => Promise<string>;Retrieves the native APNS device token that can be used for remote push notifications on iOS.
    
Example 1
const result = await getDeviceToken();
function getDeviceType
getDeviceType: () => string;Retrieves the device type information reported by the native platform.
    
Example 1
const result = getDeviceType();
function getDeviceTypeSync
getDeviceTypeSync: () => string;Synchronous variant of getDeviceType.
Example 1
const result = getDeviceTypeSync();
function getFreeDiskStorageOld
getFreeDiskStorageOld: () => Promise<number>;Backwards-compatible wrapper for the legacy free disk storage calculation on Android.
    
Example 1
const result = await getFreeDiskStorageOld();
function getFreeDiskStorageOldSync
getFreeDiskStorageOldSync: () => number;Synchronous variant of getFreeDiskStorageOld.
Example 1
const result = getFreeDiskStorageOldSync();
function getMacAddress
getMacAddress: () => Promise<string>;Retrieves the WiFi MAC address on Android and returns a constant placeholder for other platforms.
    
Example 1
const result = await getMacAddress();
function getMacAddressSync
getMacAddressSync: () => string;Synchronous variant of getMacAddress.
Example 1
const result = getMacAddressSync();
function getModel
getModel: () => string;Retrieves the model information reported by the native platform.
    
Example 1
const result = getModel();
function getReadableVersion
getReadableVersion: () => string;Retrieves the readable version information reported by the native platform.
    
Example 1
const result = getReadableVersion();
function getSystemName
getSystemName: () => string;Retrieves the system name information reported by the native platform.
    
Example 1
const result = getSystemName();
function getSystemVersion
getSystemVersion: () => string;Retrieves the system version information reported by the native platform.
    
Example 1
const result = getSystemVersion();
function getTotalDiskCapacityOld
getTotalDiskCapacityOld: () => Promise<number>;Backwards-compatible wrapper for the legacy total disk capacity calculation on Android.
    
Example 1
const result = await getTotalDiskCapacityOld();
function getTotalDiskCapacityOldSync
getTotalDiskCapacityOldSync: () => number;Synchronous variant of getTotalDiskCapacityOld.
Example 1
const result = getTotalDiskCapacityOldSync();
function getUserAgent
getUserAgent: () => Promise<string>;Retrieves the user agent information reported by the native platform.
    
Example 1
const result = await getUserAgent();
function getUserAgentSync
getUserAgentSync: () => string;Synchronous variant of getUserAgent.
    
Example 1
const result = getUserAgentSync();
function getVersion
getVersion: () => string;Retrieves the version information reported by the native platform.
    
Example 1
const result = getVersion();
function hasDynamicIsland
hasDynamicIsland: () => boolean;Determines whether the iOS device ships with a Dynamic Island cutout.
    
Example 1
const result = hasDynamicIsland();
function hasNotch
hasNotch: () => boolean;Checks the current device against a curated list to determine if a screen notch is present.
    
Example 1
const result = hasNotch();
function hasSystemFeature
hasSystemFeature: (feature: string) => Promise<boolean>;Reports whether the requested Android system feature is available on the device.
    
Example 1
const hasCamera = await hasSystemFeature('android.hardware.camera.any');
function hasSystemFeatureSync
hasSystemFeatureSync: (feature: string) => boolean;Synchronous variant of hasSystemFeature.
Example 1
const hasCamera = hasSystemFeatureSync('android.hardware.camera.any');
function isDisplayZoomed
isDisplayZoomed: () => boolean;Returns true when Display Zoom is enabled on iOS.
    
Example 1
const result = isDisplayZoomed();
function isLandscape
isLandscape: () => Promise<boolean>;Resolves to true when the current screen dimensions indicate landscape orientation.
    
Example 1
const result = await isLandscape();
function isLandscapeSync
isLandscapeSync: () => boolean;Synchronous variant of isLandscape.
Example 1
const result = isLandscapeSync();
function isLowBatteryLevel
isLowBatteryLevel: (level: number) => boolean;Helper that classifies a normalized battery level as "low" using platform-specific thresholds.
Example 1
const isLow = isLowBatteryLevel(0.12);
function isLowRamDevice
isLowRamDevice: () => boolean;Returns true on Android devices that declare the low-RAM flag.
    
Example 1
const result = isLowRamDevice();
function isTablet
isTablet: () => boolean;Returns true when the device is classified as a tablet by the native OS.
    
Example 1
const result = isTablet();
function isTabletMode
isTabletMode: () => Promise<boolean>;Returns true when Windows tablet mode is currently active.
    
Example 1
const result = await isTabletMode();
function syncUniqueId
syncUniqueId: () => Promise<string>;Preloads the unique ID on iOS so that getUniqueId can resolve synchronously later in the app lifecycle.
**Compatibility:**     
Example 1
const result = await syncUniqueId();
function useBatteryLevel
useBatteryLevel: () => number | null;React hook that streams battery level updates emitted by the native module.
**Compatibility:**     
Example 1
function BatteryIndicator() {const level = useBatteryLevel();return <Text>{level ?? 'unknown'}%</Text>;}
function useBatteryLevelIsLow
useBatteryLevelIsLow: () => number | null;React hook that notifies when the battery crosses the low-level threshold.
**Compatibility:**     
Example 1
function LowBatteryBanner() {const level = useBatteryLevelIsLow();if (level == null) {return null;}return <Banner title={`Battery low (${Math.round(level * 100)}%)`} />;}
function useBrightness
useBrightness: () => number | null;React hook that subscribes to screen brightness updates on iOS.
**Compatibility:**     
Example 1
function BrightnessSlider() {const brightness = useBrightness();return <Slider value={brightness ?? 0} disabled />;}
function useDeviceName
useDeviceName: () => AsyncHookResult<string>;React hook that resolves with the human-readable device name when it becomes available.
**Compatibility:**     
Example 1
function Greeting() {const { result: name } = useDeviceName();return <Text>Hello from {name}</Text>;}
function useFirstInstallTime
useFirstInstallTime: () => AsyncHookResult<number>;React hook that exposes the app's first install timestamp once it is retrieved.
**Compatibility:**     
Example 1
function InstallAge() {const { result } = useFirstInstallTime();return <Text>{new Date(result).toLocaleDateString()}</Text>;}
function useHasSystemFeature
useHasSystemFeature: (feature: string) => AsyncHookResult<boolean>;React hook that checks for an Android system feature and keeps the result cached.
**Compatibility:**     
Example 1
function FaceUnlockOnly() {const { result } = useHasSystemFeature('android.hardware.biometrics.face');return <Text>{result ? 'Face unlock supported' : 'Face unlock unavailable'}</Text>;}
function useIsBluetoothHeadphonesConnected
useIsBluetoothHeadphonesConnected: () => AsyncHookResult<boolean>;React hook that resolves to true whenever Bluetooth headphones are connected.
**Compatibility:**     
Example 1
function BluetoothAudioIndicator() {const { result } = useIsBluetoothHeadphonesConnected();return result ? <Icon name="bluetooth-audio" /> : null;}
function useIsEmulator
useIsEmulator: () => AsyncHookResult<boolean>;React hook that resolves as soon as the emulator detection result is known.
**Compatibility:**     
Example 1
function IsEmulatorCallout() {const { result: emulator } = useIsEmulator();return emulator ? <Text>Running on emulator</Text> : null;}
function useIsHeadphonesConnected
useIsHeadphonesConnected: () => AsyncHookResult<boolean>;React hook that resolves to true whenever any headphones are connected.
**Compatibility:**     
Example 1
function HeadphoneBadge() {const { result: connected } = useIsHeadphonesConnected();return connected ? <Badge text="Headphones" /> : null;}
function useIsWiredHeadphonesConnected
useIsWiredHeadphonesConnected: () => AsyncHookResult<boolean>;React hook that resolves to true whenever wired headphones are connected.
**Compatibility:**     
Example 1
function WiredOnlyNotice() {const { result } = useIsWiredHeadphonesConnected();return result ? <Text>Wired audio active</Text> : null;}
function useManufacturer
useManufacturer: () => AsyncHookResult<string>;React hook that resolves to the device manufacturer string.
**Compatibility:**     
Example 1
function ManufacturerLine() {const { result: manufacturer } = useManufacturer();return <Text>Made by {manufacturer}</Text>;}
function usePowerState
usePowerState: () => Partial<PowerState>;React hook that subscribes to power state changes and returns a partial PowerState.
**Compatibility:**     
Example 1
function ChargingStatus() {const powerState = usePowerState();return <Text>{powerState.batteryState}</Text>;}
Interfaces
interface AppSetIdInfo
interface AppSetIdInfo {}Google Play Services App Set ID payload describing identifier and scope. When the API is unavailable, id is "unknown" and scope is -1.
interface AsyncHookResult
interface AsyncHookResult<T> {}Shared shape returned by asynchronous hooks in this module.
interface LocationProviderInfo
interface LocationProviderInfo {}Map describing which location providers are currently enabled.
index signature
[key: string]: boolean;interface PowerState
interface PowerState {}Snapshot of the device's current power conditions.
property batteryLevel
batteryLevel: number;property batteryState
batteryState: BatteryState;property lowPowerMode
lowPowerMode: boolean;index signature
[key: string]: any;Type Aliases
type DeviceType
type DeviceType = | 'Handset' | 'Tablet' | 'Tv' | 'Desktop' | 'GamingConsole' | 'unknown';High-level classification of the device hardware.
Package Files (2)
Dependencies (0)
No dependencies.
Dev Dependencies (21)
- @jest/globals
- @react-native-community/eslint-config
- @release-it/conventional-changelog
- @testing-library/react-hooks
- @types/jest
- @types/react
- @types/react-native
- eslint
- eslint-plugin-prettier
- husky
- jest
- lint-staged
- metro-react-native-babel-preset
- react
- react-native
- react-native-builder-bob
- react-native-windows
- react-test-renderer
- release-it
- ts-jest
- typescript
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-native-device-info.
- Markdown[](https://www.jsdocs.io/package/react-native-device-info)
- HTML<a href="https://www.jsdocs.io/package/react-native-device-info"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5491 ms. - Missing or incorrect documentation? Open an issue for this package.
