DeviceInfo Module
Complete API documentation for the DeviceInfo module.
Import
Core Device Information (9 APIs)
Synchronous properties providing instant access to basic device identity.
deviceId: string
Device model identifier.
brand: string
Device brand/manufacturer name.
model: string
Device model marketing name. Maps the hardware identifier to a human-readable name, falling back to a generic name for unknown devices.
systemName: string
Operating system name.
systemVersion: string
Operating system version string.
deviceType: DeviceType
Device type category.
uniqueId: string
Get unique device identifier.
- iOS: Persists across app installs from the same vendor
- Android: Usually persists across app installs
manufacturer: string
Get device manufacturer name.
deviceName: string
Get user-assigned device name.
Device Capabilities (7 APIs)
Boolean checks for device features and hardware availability.
isTablet: boolean
Check if device is a tablet.
- iOS: Based on UIDevice.userInterfaceIdiom
- Android: Based on smallest screen width >= 600dp
isEmulator: boolean
Check if running in simulator/emulator.
deviceYearClass: number
Get estimated device year class based on hardware specifications.
Returns an estimated "year class" representing when this device's hardware would have been considered flagship/high-end. Based on extended Facebook device-year-class algorithm updated for 2025.
RAM → Year Class mapping:
isCameraPresent: boolean
Check if camera is available.
isPinOrFingerprintSet: boolean
Check if PIN, fingerprint, or Face ID is configured.
isHardwareKeyStoreAvailable: boolean
Check if hardware-backed cryptographic key storage is available on the device.
Platform: Android, iOS (except for iOS Emulator)
isLowRamDevice: boolean
Check if device is classified as low RAM device.
Platform: Android API 19+
Display & Screen (7 APIs)
Screen and display-related properties.
getHasNotch(): boolean
Check if device has a display notch.
- iOS only - Detects iPhone X and later models
- Android: Always returns
false
getHasDynamicIsland(): boolean
Check if device has Dynamic Island.
- iOS 16+ only - iPhone 14 Pro and later
- Android: Always returns
false
isDisplayZoomed: boolean
Check if iOS Display Zoom is enabled.
Platform: iOS only
getIsLandscape(): boolean
Check if device is in landscape orientation.
getBrightness(): number
Get current screen brightness level (0.0 to 1.0).
Platform: iOS only
getFontScale(): number
Get current font scale multiplier.
isLiquidGlassAvailable: boolean
Check if the liquid glass effect is available on the device.
Platform: iOS 26.0+
System Resources (7 APIs)
Memory, storage, and uptime information.
totalMemory: number
Get total device RAM in bytes.
getUsedMemory(): number
Get current app memory usage in bytes.
maxMemory: number
Get maximum memory available to app (in bytes).
Platform: Android only
totalDiskCapacity: number
Get total internal storage size in bytes.
getFreeDiskStorage(): number
Get available free storage space in bytes.
getUptime(): number
Get device uptime since boot in milliseconds, excluding deep sleep time.
Platform behavior:
- iOS: Uses
systemUptime(excludes deep sleep) - Android: Uses
uptimeMillis()(excludes deep sleep)
Both platforms return consistent "active time" since boot, matching the behavior of expo-device.getUptimeAsync().
startupTime: number
Get device boot time (milliseconds since epoch).
Note: Returns boot time, NOT app startup time
Battery & Power (4 APIs)
Battery and power state information.
getBatteryLevel(): number
Get current battery level (0.0 to 1.0).
getPowerState(): PowerState
Get comprehensive power state information.
PowerState interface:
getIsBatteryCharging(): boolean
Check if battery is currently charging.
isLowBatteryLevel(threshold: number): boolean
Check if battery level is below threshold.
Application Metadata (9 APIs)
App bundle and version information.
version: string
Get application version string.
buildNumber: string
Get application build number.
bundleId: string
Get bundle ID (iOS) or package name (Android).
applicationName: string
Get application display name.
readableVersion: string
Get human-readable version string (version.buildNumber).
getFirstInstallTime(): Promise<number>
Get timestamp when app was first installed (ms since epoch).
Performance: ~10-30ms
getLastUpdateTime(): Promise<number>
Get timestamp of most recent app update (ms since epoch).
Performance: ~10-30ms Note: Returns -1 on iOS
firstInstallTimeSync: number
Synchronous variant (uses cached value from module initialization).
lastUpdateTimeSync: number
Synchronous variant (returns -1 on iOS).
Network (6 APIs)
Network connectivity APIs (excluding carrier).
getIpAddress(): Promise<string>
Get device local IP address.
Performance: ~20-50ms
getIpAddressSync(): string
Synchronous variant (with 5-second cache).
getMacAddress(): Promise<string>
Get device MAC address.
Performance: ~20-50ms
getMacAddressSync(): string
Synchronous variant.
getUserAgent(): Promise<string>
Get HTTP User-Agent string.
Performance:
- iOS: 100-500ms (requires WebView initialization, cached after first call)
- Android: sync capable
getIsAirplaneMode(): boolean
Check if airplane mode is enabled.
Platform: Android only
Carrier Information (7 APIs)
Cellular carrier data for telecom apps, analytics, and geo-detection.
getCarrier(): Promise<string>
Get cellular carrier name.
Performance: ~20-50ms
getCarrierSync(): string
Synchronous variant (with 5-second cache).
carrierAllowsVOIP: boolean
Check if carrier allows VoIP calls on its network.
Platform: iOS only (always returns true on Android)
carrierIsoCountryCode: string
Get ISO 3166-1 alpha-2 country code for the carrier.
mobileCountryCode: string
Get Mobile Country Code (MCC) per ITU-T Recommendation E.212.
Common MCC values:
mobileNetworkCode: string
Get Mobile Network Code (MNC) that identifies the carrier within a country.
mobileNetworkOperator: string
Get combined MCC + MNC string.
Use cases:
- Carrier-specific feature toggling
- Regional content delivery
- Telecom analytics
- Fraud detection (geo-location verification)
Audio Accessories (4 APIs)
Audio device detection.
isHeadphonesConnected(): Promise<boolean>
Check if headphones are connected (wired or Bluetooth).
Performance: ~10-30ms
getIsHeadphonesConnected(): boolean
Synchronous variant.
getIsWiredHeadphonesConnected(): boolean
Check if wired headphones are connected.
getIsBluetoothHeadphonesConnected(): boolean
Check if Bluetooth headphones are connected.
Location Services (3 APIs)
Location provider information.
isLocationEnabled(): Promise<boolean>
Check if location services are enabled.
Performance: ~10-30ms
getIsLocationEnabled(): boolean
Synchronous variant.
getAvailableLocationProviders(): string[]
Get list of enabled location providers.
Localization (1 API)
Language and regional settings.
systemLanguage: string
Get device system language in BCP 47 format.
Examples:
Use Case:
CPU & Architecture (3 APIs)
Processor and ABI information.
supportedAbis: string[]
Get supported CPU architectures.
supported32BitAbis: string[]
Get list of supported 32-bit ABIs.
Platform: Android API 21+, returns [] on iOS
supported64BitAbis: string[]
Get list of supported 64-bit ABIs.
Android Platform (20+ APIs)
Android-specific APIs and build information.
apiLevel: number
Get Android API level.
Platform: Android only
navigationMode: NavigationMode
Get Android navigation mode.
Type: 'gesture' | 'buttons' | 'twobuttons' | 'unknown'
Platform: Android only (returns "unknown" on iOS)
Values:
Use Case:
Note: Navigation mode detection requires Android 10 (API 29) or later. On older Android versions, returns "buttons" since gesture navigation was not available.
getHasGms(): boolean
Check if Google Mobile Services is available.
Platform: Android only
getHasHms(): boolean
Check if Huawei Mobile Services is available.
Platform: Android (Huawei devices) only
hasSystemFeature(feature: string): boolean
Check if specific system feature is available.
Platform: Android only
Common features:
android.hardware.cameraandroid.hardware.nfcandroid.hardware.bluetoothandroid.hardware.wifi
systemAvailableFeatures: string[]
Get list of all available system features.
Platform: Android only
supportedMediaTypeList: string[]
Get list of supported media/codec types.
Platform: Android only
Android Build Information
Synchronous properties providing Android system build information.
Platform: Android only (all return "unknown" or default values on iOS)
iOS Platform (2 APIs)
iOS-specific APIs.
getDeviceToken(): Promise<string>
Get Apple DeviceCheck token.
Performance: ~500-2000ms (network request to Apple servers) Platform: iOS 11+ only (throws error on Android)
syncUniqueId(): Promise<string>
Synchronize unique ID to iCloud Keychain.
Performance: ~10-50ms (Keychain I/O) Platform: iOS (no-op on Android)
Installation & Distribution (3 APIs)
App installation and distribution metadata.
installerPackageName: string
Get package name of the app store that installed this app.
getInstallReferrer(): Promise<string>
Get install referrer information (Android Play Store).
Performance: ~50-200ms (Play Services API call) Platform: Android only (requires Google Play Services)
isSideLoadingEnabled(): boolean
Check if sideloading (installing from unknown sources) is enabled.
Platform behavior difference:
- Android 7 and below: Returns whether the device allows unknown sources globally (checks
Settings.Global.INSTALL_NON_MARKET_APPS) - Android 8.0+: Returns whether THIS APP has permission to install other apps (per-app permission via
canRequestPackageInstalls()) - iOS: Always returns
false(sideloading not possible without jailbreak)
Important: On Android 8.0+, even if the user has enabled "Install unknown apps" for other apps, this will return false unless they specifically granted permission to this app.
Use cases:
- Security policy enforcement
- Distribution channel detection
- Enterprise deployment verification
Platform: Android (returns false on iOS)
Legacy Compatibility (2 APIs)
Deprecated APIs for backward compatibility.
totalDiskCapacityOld: number
Get total disk capacity using legacy Android API.
getFreeDiskStorageOld(): number
Get free disk storage using legacy Android API.
Performance Notes
Synchronous Methods (<1ms)
All synchronous methods use cached values and return instantly:
- Core device properties
- Device capabilities
- Display & screen
- System resources (memory, disk)
- Battery information
- Application metadata
- CPU & architecture
Asynchronous Methods
Performance varies by operation type:
- Fast (10-30ms): Install times, location status, headphone detection
- Medium (20-50ms): Network queries (IP, MAC, carrier)
- Slow (100-500ms): UserAgent (iOS WebView init, cached after first call)
- Very Slow (500-2000ms): DeviceCheck token (network request)
Caching
Network-related synchronous properties use 5-second caches:
getIpAddressSync()getMacAddressSync()getCarrierSync()
This provides fast access while keeping data reasonably fresh.
Platform Compatibility Matrix
Next Steps
- View Type Definitions for TypeScript types
- Check out Usage Examples
- Read the Migration Guide for upgrading from
react-native-device-info
