Google Play Store: Required declarations for “Foreground Services” and “Health”

Transistor Software
2 min readJun 17, 2024

--

With Android 14 (targetSdkVersion 34 ), the Google Play Store now requires declarations for a couple of permissions that the background-geolocation SDK automatically inserts into your app’s AndroidManifest :

<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />

These permissions are crucial to the operation of the Background Geolocation SDK.

ACTIVITY_RECOGNITION

TheACTIVITY_RECOGNITION permission allow the SDK to monitor the Android Motion API to automatically toggle location-tracking ON/OFF based upon the detected motion-activity of the device (eg: on_foot, in_vehicle, on_bicycle, running, still ).

Provide the following required declaration, selecting the category “Other”:

“The app uses the ActivityTransition API to automatically toggle location-services ON when the device is detected be in-motion. When the motion API reports the device is “still”, the app turns OFF location-services to conserve battery”

I don’t want this permission

If you want to remove this automatically-added permission from your app, add the following override with tools:node=”remove" to your AndroidManifest:

<manifest>
<uses-permission
android:name="android.permission.ACTIVITY_RECOGNITION"
tools:node="remove" />
.
.
.
</manifest>

You should also configure the plugin in .ready(config)with:

disableMotionActivityUpdates: true

FOREGROUND_SERVICE_LOCATION

The FOREGROUND_SERVICE_LOCATION permission allows the SDK to turn on a foreground-service to constantly monitor the device location, regardless if app is terminated or device rebooted.

The Background Geolocation demo app was successfully published using the following declarations, enabling both “User-initiated location sharing” and “Geofencing”.

Foreground Service Permissions

The following very simple video was provided for both:

“Your update is live”

After providing the declarations above, the Google Play Store allowed the Background Geolocation demo app to be published.

--

--

Transistor Software

Creator of Background Geolocation SDK. Professional plugin developers — geolocation specialists. https://www.transistorsoft.com