For AI agents: the complete documentation index is available at /react-native-nitro-device-info/llms.txt, the full documentation bundle is available at /react-native-nitro-device-info/llms-full.txt, and this page is available as Markdown at /react-native-nitro-device-info/guide/quick-start.md.

Quick Start

Complete Getting Started or Expo Setup and rebuild your native app first.

This page uses the native API from the package root. For react-native-device-info-style functions, use the /compat entry point.

Read a property, call a method, await a Promise

import { DeviceInfoModule } from 'react-native-nitro-device-info';

// Properties: no parentheses and no await.
const model = DeviceInfoModule.model;
const isTablet = DeviceInfoModule.isTablet;

// Synchronous methods: parentheses, no await.
const batteryLevel = DeviceInfoModule.getBatteryLevel();
const hasGms = DeviceInfoModule.getHasGms();

// Promise-based methods: await inside an async function.
async function readNetworkInfo() {
  try {
    const [ipAddress, carrier] = await Promise.all([
      DeviceInfoModule.getIpAddress(),
      DeviceInfoModule.getCarrier(),
    ]);
    console.log({ ipAddress, carrier });
  } catch (error) {
    console.error('Could not read network information', error);
  }
}

console.log({ model, isTablet, hasGms });
console.log(batteryLevel < 0
  ? 'Battery: unavailable'
  : `Battery: ${Math.round(batteryLevel * 100)}%`);
void readNetworkInfo();

getBatteryLevel() returns -1 when unavailable. getHasGms() returns false on iOS. Promise return types do not specify a completion deadline.

Display changing values in React

A direct getter reads a snapshot. Use a hook when the component must update as the value changes.

import { Text, View } from 'react-native';
import {
  DeviceInfoModule,
  useBatteryLevel,
} from 'react-native-nitro-device-info';

export default function DeviceInfoScreen() {
  const batteryLevel = useBatteryLevel();

  return (
    <View>
      <Text>Model: {DeviceInfoModule.model}</Text>
      <Text>OS: {DeviceInfoModule.systemVersion}</Text>
      <Text>Battery: {batteryLevel === null
        ? 'Loading or unavailable'
        : `${Math.round(batteryLevel * 100)}%`}</Text>
    </View>
  );
}

useBatteryLevel() reads after mount and polls every five seconds. It returns null before the first reading or when the battery level is unavailable. See React Hooks for update intervals and other return types.

Check units and unsupported values

ValueUnit or meaningCheck before use
totalMemory, getUsedMemory()Bytes; device RAM and current app memory respectivelyAvailability depends on the platform
getBatteryLevel()Fraction from 0 to 1-1 means unavailable
getBrightness()Fraction from 0 to 1 on iOS-1 on Android
apiLevelAndroid API level-1 on iOS
uniqueIdiOS IDFV or Android ANDROID_IDCan change; do not treat it as an account or permanent device identity

See DeviceInfo Module for exact signatures, caching, permissions, and platform behavior. Web uses fallback values.

Next steps