API Reference Overview
Complete API documentation for react-native-nitro-device-info.
Module Import
API Organization
The API is organized into the following categories:
Core Device Information
Synchronous properties providing instant access to basic device information:
deviceId,brand,model- Device identificationsystemName,systemVersion- OS informationdeviceType- Device category (Handset, Tablet, etc.)
Device Capabilities
Methods to check device features and hardware:
isTablet()- Tablet detectionhasNotch(),hasDynamicIsland()- Display featuresisCameraPresent(),isPinOrFingerprintSet()- Hardware checksisEmulator()- Simulator/emulator detection
Device Identification
Unique identifiers and manufacturer information:
getUniqueId()- Platform-specific unique IDgetManufacturer()- Device manufacturer
System Resources
Memory and storage monitoring:
getTotalMemory(),getUsedMemory()- RAM informationgetTotalDiskCapacity(),getFreeDiskStorage()- Storage information
Battery Information
Battery status and power state:
getBatteryLevel()- Current battery level (0.0-1.0)getPowerState()- Comprehensive power stateisBatteryCharging()- Charging statusisLowBatteryLevel(threshold)- Low battery check
Application Metadata
Information about your application:
getVersion(),getBuildNumber()- App version infogetBundleId(),getApplicationName()- App identitygetFirstInstallTime(),getLastUpdateTime()- Installation timestamps
Network & Connectivity
Network and connectivity information (mostly async):
getIpAddress()- Local IP addressgetCarrier()- Cellular carrier nameisLocationEnabled()- Location services statusisHeadphonesConnected()- Audio output detection
Platform-Specific Methods
Platform-specific functionality:
getApiLevel()- Android API levelgetSupportedAbis()- CPU architectureshasGms(),hasHms()- Mobile services detectionhasSystemFeature(feature)- Android feature detection
Android Build Information
Android system build details:
serialNumber,androidId,securityPatchfingerprint,bootloader,hardware- And many more build properties
Advanced Capabilities
Advanced device state and features:
isAirplaneMode()- Airplane mode statusisLowRamDevice()- Low RAM device detectionisLandscape()- Orientation detection- Headphone type detection
iOS-Specific Features
iOS-exclusive functionality:
isDisplayZoomed()- Display Zoom settinggetBrightness()- Screen brightnessgetDeviceToken()- DeviceCheck tokensyncUniqueId()- iCloud Keychain sync
Device Integrity & Attestation
Two complementary layers:
- Device Integrity (local) —
isDeviceCompromised(),verifyDeviceIntegrity(). Instant, offline root/jailbreak heuristics. Bypassable. - Device Attestation — opt-in
react-native-nitro-device-integritypackage. Hardware-backed, server-verified Play Integrity (Android) and App Attest / DeviceCheck (iOS).
API Characteristics
Synchronous vs Asynchronous
Synchronous (<1ms):
- Core device properties
- Device identification
- System resources (memory, disk)
- Battery information
- Application metadata
Asynchronous (10-100ms):
- Network information (IP, MAC, carrier)
- Location services status
- Installation timestamps
- Some connectivity checks
Very Slow (500-2000ms):
getUserAgent()on iOS (first call)getDeviceToken()on iOS
Performance Tips
- Use synchronous methods when available - they return instantly
- Cache async results for values that don't change frequently
- Batch async calls using
Promise.all()for parallel execution - Use sync variants for cached network values (
ipAddressSync,carrierSync)
Type Definitions
The library includes full TypeScript definitions. See Type Definitions for detailed information about:
PowerState- Battery and power stateBatteryState- Battery charging statusDeviceType- Device category types
Migration Guide
If you're migrating from react-native-device-info, check out the Migration Guide for:
- API compatibility overview
- Key differences
- Migration examples
- Breaking changes
Platform Compatibility
Most APIs work on both iOS and Android, with some platform-specific features:
- iOS-only:
hasNotch(),hasDynamicIsland(),getBrightness(),getDeviceToken() - Android-only:
getApiLevel(), Android Build info,hasGms(),hasSystemFeature()
See the DeviceInfo Module page for detailed platform compatibility information.
Next Steps
- Explore the Complete API Reference
- Check out Type Definitions
- Read the Migration Guide
- View Examples
