### Pedometer Usage Example Source: https://docs.expo.dev/versions/v55.0.0/sdk/pedometer This example demonstrates how to check pedometer availability, get past step counts, and subscribe to live updates. Ensure you handle the subscription cleanup. ```jsx import { useState, useEffect } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { Pedometer } from 'expo-sensors'; export default function App() { const [isPedometerAvailable, setIsPedometerAvailable] = useState('checking'); const [pastStepCount, setPastStepCount] = useState(0); const [currentStepCount, setCurrentStepCount] = useState(0); const subscribe = async () => { const isAvailable = await Pedometer.isAvailableAsync(); setIsPedometerAvailable(String(isAvailable)); if (isAvailable) { const end = new Date(); const start = new Date(); start.setDate(end.getDate() - 1); const pastStepCountResult = await Pedometer.getStepCountAsync(start, end); if (pastStepCountResult) { setPastStepCount(pastStepCountResult.steps); } return Pedometer.watchStepCount(result => { setCurrentStepCount(result.steps); }); } }; useEffect(() => { const subscription = subscribe(); return () => subscription && subscription.remove(); }, []); return ( Pedometer.isAvailableAsync(): {isPedometerAvailable} Steps taken in the last 24 hours: {pastStepCount} Walk! And watch this go up: {currentStepCount} ); } const styles = StyleSheet.create({ container: { flex: 1, marginTop: 15, alignItems: 'center', justifyContent: 'center', }, }); ``` -------------------------------- ### Install @shopify/react-native-skia with bun Source: https://docs.expo.dev/versions/v55.0.0/sdk/skia Use this command to install the library using bun. ```sh bun expo install @shopify/react-native-skia ``` -------------------------------- ### Install @react-native-async-storage/async-storage with bun Source: https://docs.expo.dev/versions/v55.0.0/sdk/async-storage Use this command to install the library using bun. ```sh bun expo install @react-native-async-storage/async-storage ``` -------------------------------- ### Install @react-native-segmented-control/segmented-control with bun Source: https://docs.expo.dev/versions/v55.0.0/sdk/segmented-control Use this command to install the library using bun. ```sh bun expo install @react-native-segmented-control/segmented-control ``` -------------------------------- ### Install @react-native-async-storage/async-storage with pnpm Source: https://docs.expo.dev/versions/v55.0.0/sdk/async-storage Use this command to install the library using pnpm. ```sh pnpm expo install @react-native-async-storage/async-storage ``` -------------------------------- ### Install @react-native-async-storage/async-storage with npm Source: https://docs.expo.dev/versions/v55.0.0/sdk/async-storage Use this command to install the library using npm. ```sh npx expo install @react-native-async-storage/async-storage ``` -------------------------------- ### Install @shopify/react-native-skia with pnpm Source: https://docs.expo.dev/versions/v55.0.0/sdk/skia Use this command to install the library using pnpm. ```sh pnpm expo install @shopify/react-native-skia ``` -------------------------------- ### Install @react-native-async-storage/async-storage with yarn Source: https://docs.expo.dev/versions/v55.0.0/sdk/async-storage Use this command to install the library using yarn. ```sh yarn expo install @react-native-async-storage/async-storage ``` -------------------------------- ### Install react-native-gesture-handler with bun Source: https://docs.expo.dev/versions/v55.0.0/sdk/gesture-handler Use this command to install the library using bun. ```sh bun expo install react-native-gesture-handler ``` -------------------------------- ### Install react-native-webview Source: https://docs.expo.dev/versions/v55.0.0/sdk/webview Install the react-native-webview library using your preferred package manager. ```sh npx expo install react-native-webview ``` ```sh yarn expo install react-native-webview ``` ```sh pnpm expo install react-native-webview ``` ```sh bun expo install react-native-webview ``` -------------------------------- ### Install @shopify/react-native-skia with npm Source: https://docs.expo.dev/versions/v55.0.0/sdk/skia Use this command to install the library using npm. ```sh npx expo install @shopify/react-native-skia ``` -------------------------------- ### Install @react-native-masked-view/masked-view with bun Source: https://docs.expo.dev/versions/v55.0.0/sdk/masked-view Use this command to install the library using bun. ```sh bun expo install @react-native-masked-view/masked-view ``` -------------------------------- ### Install @shopify/react-native-skia with yarn Source: https://docs.expo.dev/versions/v55.0.0/sdk/skia Use this command to install the library using yarn. ```sh yarn expo install @shopify/react-native-skia ``` -------------------------------- ### Install expo-video-thumbnails Source: https://docs.expo.dev/versions/v55.0.0/sdk/video-thumbnails Install the expo-video-thumbnails package using npm, yarn, pnpm, or bun. ```sh npx expo install expo-video-thumbnails ``` ```sh yarn expo install expo-video-thumbnails ``` ```sh pnpm expo install expo-video-thumbnails ``` ```sh bun expo install expo-video-thumbnails ``` -------------------------------- ### Install expo-screen-capture Source: https://docs.expo.dev/versions/v55.0.0/sdk/screen-capture Install the expo-screen-capture package using npm, yarn, pnpm, or bun. ```sh npx expo install expo-screen-capture ``` ```sh yarn expo install expo-screen-capture ``` ```sh pnpm expo install expo-screen-capture ``` ```sh bun expo install expo-screen-capture ``` -------------------------------- ### Install @react-native-segmented-control/segmented-control with pnpm Source: https://docs.expo.dev/versions/v55.0.0/sdk/segmented-control Use this command to install the library using pnpm. ```sh pnpm expo install @react-native-segmented-control/segmented-control ``` -------------------------------- ### Install expo-audio Source: https://docs.expo.dev/versions/v55.0.0/sdk/audio Install the expo-audio library using your preferred package manager. ```sh npx expo install expo-audio ``` ```sh yarn expo install expo-audio ``` ```sh pnpm expo install expo-audio ``` ```sh bun expo install expo-audio ``` -------------------------------- ### Start a Live Activity Tracking Source: https://docs.expo.dev/versions/v55.0.0/sdk/widgets Initiate a Live Activity by calling the `start` method with activity props and a deep link URL. The returned instance can be used for further management of the Live Activity. ```tsx import { Button, View } from 'react-native'; import DeliveryActivity from './DeliveryActivity'; function App() { const startDeliveryTracking = () => { // Start the Live Activity const instance = DeliveryActivity.start( { etaMinutes: 15, status: 'Your delivery is on the way', }, 'myapp://deliveries/12345' ); // Store instance }; return (