> ## Documentation Index
> Fetch the complete documentation index at: https://docu.truemetrics.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Expo Integration

> Start the integration in less than 5 minutes.

Adding truemetrics via Expo can't be easier. Find more instructions and a [demo app](https://github.com/TRUE-Metrics-io/truemetrics_android_demo_expo_app_p) in our github repositories.

1. Install dependencies

```bash theme={null}
npm install expo-truemetrics-sdk
```

You may need to install additional dependencies:

```bash theme={null}
npx expo install expo-build-properties
```

```bash theme={null}
npx expo install expo-location
```

```bash theme={null}
npx expo install @react-native-async-storage/async-storage
```

```bash theme={null}
npm install
```

Declare Android dependencies in `app.json`:

```
"android": {
  ...
  "permissions": [
    "ACCESS_COARSE_LOCATION",
    "ACCESS_FINE_LOCATION",
    "ACTIVITY_RECOGNITION",
    "READ_PHONE_STATE"
  ]
},
```

For reference, SDK uses permissions:

```
android.permission.FOREGROUND_SERVICE
android.permission.INTERNET
android.permission.HIGH_SAMPLING_RATE_SENSORS
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_BACKGROUND_LOCATION
android.permission.ACCESS_NETWORK_STATE
android.permission.CHANGE_NETWORK_STATE
android.permission.ACTIVITY_RECOGNITION
android.permission.READ_PHONE_STATE
android.permission.POST_NOTIFICATIONS
```

Add Maven repo for the SDK to `plugins` in `app.json`:

```
[
  "expo-build-properties",
  {
    "android": {
      "extraMavenRepos": [
        "https://github.com/TRUE-Metrics-io/truemetrics_android_SDK_p_maven/raw/main"
      ]
    }
  }
]
```

Add to `plugins` in `app.json`:

```
[
  "expo-location",
  {
    "locationAlwaysAndWhenInUsePermission": "Allow app to access location."
  }
]
```

2. Start the app

```bash theme={null}
 npx expo start
```

or

```bash theme={null}
npx expo run:android
```

and boom you are done
