as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

expo-device

@amazon-devices/expo-device provides access to system information about the physical device, such as its manufacturer and model.

Installation

  1. Add the JavaScript library dependency in the package.json file.

    Copied to clipboard.

     dependencies: {
         ...
         "@amazon-devices/expo-device": "~2.0.1",
     }
    
  2. Reinstall dependencies using the npm install command.
  3. Run the vega build command.

Examples

Copied to clipboard.

import React, {useEffect, useState} from 'react';
import {StyleSheet, View, Text} from 'react-native';
import * as Device from '@amazon-devices/expo-device';

export const App = () => {
  const [deviceType, setDeviceType] = useState<Device.DeviceType>();
  const [uptime, setUptime] = useState<number>();

  useEffect(() => {
    Device.getDeviceTypeAsync().then(setDeviceType);
    Device.getUptimeAsync().then(setUptime);
  }, []);

  return (
    <View style={styles.container}>
      <Text style={styles.text}>manufacturer: {Device.manufacturer}</Text>
      <Text style={styles.text}>modelName: {Device.modelName}</Text>
      <Text style={styles.text}>
        is TV: {String(deviceType === Device.DeviceType.TV)}
      </Text>
      <Text style={styles.text}>uptime: {uptime}</Text>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'white',
    justifyContent: 'center',
    alignItems: 'center',
  },
  text: {
    fontSize: 30,
    color: 'black',
  },
});

API reference

See the dedicated documentation page for information about this library and API reference: Official Expo documentation for expo-device.

Constants

Name Type Description Supported
Device.brand string | null The device brand and consumer-visible brand of the product/hardware. On the web and Vega, this value is always null. Not on Vega
Device.designName string | null Configuration or name of the industrial design. Represents the device's name when it was designed during manufacturing into mass production. On the web and Vega, this value is always null. Not on Vega
Device.deviceName string | null The human-readable name of the device, which can be set by the device's user. If the device name is unavailable on the web or Vega, this value is null. Not on Vega
Device.deviceType DeviceType | null The device type as a DeviceType enum value. ✅ Yes
Device.deviceYearClass number | null The device year class of this device. On the web and Vega, this value is always null. Not on Vega
Device.manufacturer string | null The device manufacturer of the product or hardware. This value of this field might be null if it can't be determined. ✅ Yes
Device.modelName string | null The human-friendly name of the device model. People use this name to refer to the device rather than a programmatic model identifier. The value of this field might be null, if it can't be determined. ✅ Yes
Device.osBuildFingerprint string | null A string that uniquely identifies the build of the currently running system OS. ✅ Yes
Device.osBuildId string | null The build ID of the OS that more precisely identifies the version of the OS. On the web, this value is always null. ✅ Yes
Device.osInternalBuildId string | null The internal build ID of the OS running on the device. On the web, this value is always null. ✅ Yes
Device.osName string | null The name of the OS running on the device. ✅ Yes
Device.osVersion string | null The human-readable OS version string. The version string might not always contain three numbers separated by dots. ✅ Yes
Device.productName string | null The device's product name chosen by the device implementer, containing the development name or code name of the device. Corresponds to Build.PRODUCT. On the web, this value is always null. ✅ Yes
Device.supportedCpuArchitectures string[] | null A list of supported processor architecture versions. The device expects the binaries it runs to be compiled for one of these architectures. This value is null if the supported architectures can't be determined, like on the web. ✅ Yes
Device.totalMemory number | null The device's total memory, in bytes. The total memory accessible to the kernel, but not necessarily to a single app. The amount of RAM the device has, which doesn't include below-kernel fixed allocations like DMA buffers or RAM for the baseband CPU. On the web and Vega, this value is always null. ✅ Yes

Methods

Name Type Description Supported
Device.getDeviceTypeAsync() Promise<DeviceType> Checks the type of the device as a DeviceType enum value. ✅ Yes
Device.getUptimeAsync() Promise<number> Gets the uptime since the last reboot of the device, in milliseconds. ✅ Yes
Device.isRootedExperimentalAsync() Promise<boolean> Checks if the device running the Expo app is rooted (Android) or jailbroken (iOS). Not on Vega

Enums

DeviceType

Name Value Description
UNKNOWN DeviceType.UNKNOWN = 0 An unrecognized device type
PHONE DeviceType.PHONE = 1 Mobile phone handsets with a touch screen and held in one hand
TABLET DeviceType.TABLET = 2 Tablet computers with a touch screen that is larger than a usual phone
DESKTOP DeviceType.DESKTOP = 3 Desktop or laptop computers with a keyboard and mouse
TV DeviceType.TV = 4 Device with TV-based interfaces

Error codes

Code Description
ERR_DEVICE_ROOT_DETECTION Error code thrown for isRootedExperimentalAsync. Error can be thrown if there's no read access to certain system files.

Known issues and limitations

  • Device.deviceType & Device.getDeviceTypeAsync() - return either UNKNOWN or TV
  • Device.totalMemory - returns null

Supported versions

Package Version Based On @amazon-devices/react-native-kepler version
2.0.x 5.8.0 2.0.x

Supported Third-Party Libraries and Services.


Last updated: Sep 30, 2025