- In your
AndroidManifest.xml
, request fine location permissions:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- In the
application
element of yourAndroidManifest.xml
, declare the Appboy location service:
<service android:name="com.appboy.services.AppboyLocationService"/>
Minimum time and distance thresholds between location updates are fully configurable.
Time thresholds are specified in seconds and distance thresholds are specified in meters. We recommend 3600s
and 1000.0m
respectively.
To enable background location tracking and configure your time and distance thresholds, contact us at [email protected].
In the near future, enabling background location tracking and configuring time and distance thresholds will be possible via the Appboy dashboard.
With the release of Android M, Android switched from an install-time to a runtime permissions model. To enable location tracking of any kind, location permissions must be obtained from the user explicitly by the app. Once location permissions are obtained, Appboy will begin background location tracking automatically on the next session start.
For more information, see https://developer.android.com/training/permissions/index.html