Request Access to Location in the Background for your Geofences - Android

Request Access to Location in the Background for your Geofences - Android

Since October 2020, to use the location in the background on Android app (meaning the app will keep locating the final user even if the app in not active but only running in the background of the user’s phone) Google must allow it. 
For this you must get approval from Google for your app's access to location in the background.

The location in the background is by default not used on Muse mBaaS apps, unless you added the geofences extension in your backend.

We list in this online help what you need to do, to use the geofence extension on your app and get approval for your app's access to location in the background.

For more details, please read Google's documentation: https://support.google.com/googleplay/android-developer/answer/9799150


1. Provide Prominent in-App Disclosure

"You must provide an in-app disclosure of your data access, collection, use, and sharing. 
The language in the disclosure MUST include the following elements:
- The term “location”
- Indication that the nature of usage is in the background by using one of the following phrases “background” / “when the app is closed” / “always in use” / “when the app is not in use”
- A list of all the features that use location in the background"


Set your prominent in-app disclosure:
1. Go to the menu Settings > App Settings >  Compilation settings  of your backend
2. Edit the default message under "Geolocation alert message"
3. Rebuild your Android app to apply your modification from the menu Publish > Android app > Publish  that will generate a new version of your Android app.


2. Privacy Policy

"Adding a privacy policy to your app's store listing helps provide transparency about how you treat sensitive user and device data. The privacy policy must, together with any in-app disclosures, comprehensively disclose how your app collects, uses, and shares user data, including the types of parties with whom it’s shared. You should consult your own legal representative to advise you of what is required."

Since your app uses location in the background when you set the Geofences extension, your privacy policy must contain appropriate related disclosures, make sure to add it your privacy policy.


3. Provide a Video Demonstration

"As part of the permissions declaration, you must provide a link to a short video that demonstrates the location-based feature in your app that requires access to location in the background (while the app is not in use)."

Basically, you need to make a video screen of your app showing:
1. The prominent in-app disclosure dialog displayed to users (described above)
2. When you receive a push notification via the geofence extension to justify the use of the location in background (while the app is not in use).

Use the Android Ad-Hoc version (test version of your app) to create your video.

The recommended duration is 30 seconds or less. A YouTube link is the preferred video format, but Google Drive storage links to an mp4 or other common video file formats are also supported.


4. Declare Permission for your App

Solo process:
The Permissions Declaration Form is displayed during the release process, if the app includes an APK that requests permission for which a Permissions Declaration has not been provided to Google Play.

If you have active APKs that require a Permissions Declaration, an alert is displayed on the left menu under Store Presence > App Content of the Play Store.
You cannot publish any changes to your app, including changes to your Store Presence (e.g. Store Listing, Pricing & Distribution) until you address this alert by creating a release that includes a Permissions Declaration.

1. Open the Play Console.
2. Select your app
3. Go to the menu Policy > App Content
4. Click "Start" under Sensitive app permissions and fill in the form:
- Android P or older: Select Yes
- Policy compliance: Select Yes, this app meets the Location permissions policy
- App Purpose: Explain what is the main purpose of your app
- Location access: Explain why does your app need access to location in the background (how you use the geofence extension)
- Video instructions: Provide the link to your video (see step 3 above)
5. Click "Save"

Muse mBaaS Takes Care Service process:
1. When you fill in the form  to ask for your Android app to be generated (compiled), specify:

- App Purpose: Explain what is the main purpose of your app.
- Location access: Explain why does your app need access to location in the background (how you use the geofence extension).
- Leave the video URL empty for now.

2. Once your app is generated, create your video using the ad hoc version generated (see step 3 above)
3. Add your video URL in this form  and save it (the video url is mandatory to be able to submit your app to the Play Store.)
4. Ask for the submission of your app to the Play Store.

    • Related Articles

    • Geofences (Full & Premium Plan Only)

      The Geofencing extension allows you to define geographical areas within which the dispatch of notifications to your app users will be automatic for native apps only. You have 3 geofences included with the Full plan and above*. You can buy extra ...
    • "Kontact" Beacons

      1. The Kontact Brand and Its Application As soon as you receive your Kontact order, the group of beacons received will already be programmed with the same UUID, and different Major/Minor parameters. However, these are default UUID and Major/Minor ...
    • "Estimote" Beacons

      1. The Estimote Brand and Its Application When you receive your Estimote order, your beacons will have already been assigned the same UUID and different Major / Minor parameters. However, these are default UUID and Major/Minor settings. We suggest ...
    • Beacons (Native Apps Only)

      1. What is a beacon? A beacon emits a Bluetooth Low Energy signal, being Bluetooth 4.0, that consumes very little power, especially compared to previous versions. They give the option to define a radius in which the user can receive a notification. A ...
    • Android - Grant Muse GRAVITY Access to the Google Project

      Muse mBaaS is taking care of the publication process of your Android app and the settings of your in-app purchases. Although we will deal with majority of the operations, some actions can only be performed by the owner of the Google Play account due ...