> For the complete documentation index, see [llms.txt](https://docs.sentiance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sentiance.com/getting-started/sdk-integration/2.-including-the-sdk/react-native/expo.md).

# Expo

## External Dependencies

Apart from the core React Native and Expo libraries, there are no additional external React Native library dependencies.

For external dependencies in the native SDKs, check out [this page](/getting-started/sdk-integration/2.-including-the-sdk/android.md#external-dependencies) for Android and [this one](/getting-started/sdk-integration/2.-including-the-sdk/ios.md#external-dependencies) for iOS.

## Steps

{% stepper %}
{% step %}

### **Install the Sentiance Core React Native module**

Run the command in Terminal:

{% code title="Terminal" %}

```bash
npm install @sentiance-react-native/core
```

{% endcode %}

The module should now be added to your project's **package.json** file.

{% code title="package.json" %}

```json
{
  ...,
  "dependencies": {
    ...,
    "@sentiance-react-native/core": "^x.y.z"
  }
}
```

{% endcode %}

The <mark style="color:$success;">**`@sentiance-react-native/core`**</mark> module must be installed before using any other Sentiance service.
{% endstep %}

{% step %}

### Configure the Sentiance Expo config plugin

Add the Sentiance Core config plugin to your `app.json`. The plugin takes care of initializing the SDK on app start, configuring the Android foreground service notification and background location permission, and wiring up the required platform-specific hooks on both Android and iOS.

On iOS, the plugin enables the necessary background modes and registers the background task identifier used by the SDK's processing tasks.

On Android, the Sentiance SDK runs a [foreground service](https://developer.android.com/develop/background-work/services/fgs) while operating in the background, which causes the system to display a persistent notification. The `android.notification` block lets you customize its title, text, icon, and channel to match your app's branding and deliver a consistent experience to your users.&#x20;

In addition, the plugin automatically declares the [background location permission](https://developer.android.com/reference/android/Manifest.permission#ACCESS_BACKGROUND_LOCATION) and the [activity recognition permission](https://developer.android.com/reference/android/Manifest.permission#ACTIVITY_RECOGNITION) inside the application manifest.

{% code title="app.json" %}

```json
{
  "expo": {
    "plugins": [
      "...": "...",
      [
        "@sentiance-react-native/core",
        {
          "android": {
            // Optional: customize the foreground service notification
            "notification": {
              "title": "Your App",
              "text": "Running in the background",
              "channelId": "sentiance",
              "channelName": "Sentiance",
              "icon": "notification_icon",
              "id": 1
            }
          }
        }
      ]
    ],
    "ios": {
      "...": "...",
      // Required: location & motion permission descriptions
      "infoPlist": {
        "NSLocationAlwaysAndWhenInUseUsageDescription": "This app uses your location to provide insights.",
        "NSLocationWhenInUseUsageDescription": "This app uses your location to provide insights.",
        "NSLocationAlwaysUsageDescription": "This app uses your location to provide insights.",
        "NSMotionUsageDescription": "This app uses motion data to detect your transportation mode.",
      }
    }
  }
}
```

{% endcode %}
{% endstep %}

{% step %}

### Next: Initialize the SDK

After having included the Sentiance SDK, proceed to [initializing the SDK](/getting-started/sdk-integration/3.-sdk-initialization/android.md#steps).
{% endstep %}
{% endstepper %}
