Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

expo-constants

@amazon-devices/expo-constants provides system information that remains constant throughout the lifetime of your app's install.

Installation

  1. Add the JavaScript library dependency in the package.json file. Select the tab for your React Native version.


    Copied to clipboard.

     dependencies: {
         ...
         "@amazon-devices/expo-constants": "~2.0.0",
         "expo": "~50.0.0",
         ...
     }
    

    Copied to clipboard.

     dependencies: {
         ...
         "@amazon-devices/expo-constants": "~3.0.0",
         "expo": "~50.0.0",
         ...
     }
    
  2. Reinstall dependencies using npm install command.

Examples

Copied to clipboard.

import React from 'react';
import Constants from '@amazon-devices/expo-constants';
import {StyleSheet, Text, View} from 'react-native';

export const App = () => {
  return (
    <View style={styles.container}>
      <Text style={styles.text}>
        isHeadless: {String(Constants.isHeadless)}
      </Text>
      <Text style={styles.text}>
        statusBarHeight: {Constants.statusBarHeight}
      </Text>
      <Text style={styles.text}>
        systemFonts: {Constants.systemFonts.join(', ')}
      </Text>
    </View>
  );
};

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

API reference

Check out the dedicated documentation page for info about this library, API reference and more: Official Expo documentation for expo-constants.

Implementation details

Currently, all values are mocks. Don't depend on any of the constants inside this package.

Supported versions

NPM package version Vega SDK version Vega OS version React Native version
2.0.1758683737 0.23 and earlier OS 1.1 (1401010009820) and earlier 0.72
3.0.1+15.2.0 0.24 OS 1.2 (2101020054720) 0.72, 0.83

Additional resources

For information on additional libraries, see Supported Third-Party Libraries and Services.


Last updated: Aug 03, 2026