as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
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.

    Copied to clipboard.

     dependencies: {
         ...
         "@amazon-devices/expo-constants": "~2.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

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

Additional resources

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


Last updated: Sep 30, 2025