Search…
3. Configuration

iOS // Configuring Xcode

  1. 1.
    Go to Signing & Capabilities.
  2. 2.
    Turn on Background Modes and enable Location updates.

Android // Configuring AndroidManifest.xml

Add the Required Permissions

When targeting API level 29 (Android 10), you must add the following permissions to your app's AndroidManifest.xml file.
AndroidManifest.xml
1
<manifest ...>
2
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
3
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>
4
...
5
6
</manifest>
Copied!
See the Android permissions page for more details.

Customize the Notification

The Sentiance SDK needs to provide a notification to Android, which gets shown to the user when a foreground service is running. You can customize this notification via the AndroidManifest.xml file.
AndroidManifest.xml
1
<application ...>
2
<meta-data android:name="com.sentiance.react.bridge.notification_title" android:resource="@string/app_name"/>
3
<meta-data android:name="com.sentiance.react.bridge.notification_text" android:value="Touch to open."/>
4
<meta-data android:name="com.sentiance.react.bridge.notification_icon" android:resource="@mipmap/ic_launcher"/>
5
<meta-data android:name="com.sentiance.react.bridge.notification_channel_name" android:value="Sentiance"/>
6
<meta-data android:name="com.sentiance.react.bridge.notification_channel_id" android:value="sentiance"/>
7
8
...
9
</application>
Copied!