I have currently some troubles to make my app comply with the new "Google Background Location Policy".
Here is my situation :
My application is targeting Android Api 22 and Up
I have the following permissions required in my app : ACCESS_FINE_LOCATION
I need this permission to display the User position in a Map while the app is in Foreground and for Bluetooth Low Energy usage
I do not fetch location while the app is in Background
I don't understand how to setup the Google Play Console.
The only cases I can see are the following :
My application use location and is available starting from API 29, but do not require the ACCESS_BACKGROUND_LOCATION permission.
My application don't use Location and don't have any *_LOCATION permissions.
I am missing the case where :
My Application is available starting from API 22, So I don't have the ACCESS_BACKGROUND_LOCATION permission. But my app requires location permission in foreground and uses Bluetooth, so I need the ACCESS_FINE_LOCATION permission. I never request location in the background.
I guess the application already comply with the "Background Location Policy" since the app only fetch the location in foreground.
However my apps updates are always rejected due to this policy, so I am a little bit confused.
Why my app do not comply ?
Is it only because I have the permission ACCESS_FINE_LOCATION present in my app, and by default Google assume that the app request location in background ?
Do I need to restrict my app to Android 9 and older, in order to not get stuck with the automatic attribution of ACCESS_BACKGROUND_LOCATION permission?
Do I need to fill the Background Location Permission form in the Google Console and explain that I do not access location in the background ?
Something else ?
Thanks for your feedback on it.
try submitting and say you dont use background (declare foreground usage)
Probably you're requesting location update on a Service (even a foreground service)
This is kind of automatic scan from google.
Your app is targeting below API 29, uses ACCESS_FINE_LOCATION permission
is same with targeting API 29 and above and uses ACCESS_BACKGROUND_LOCATION
In my case, Google needed a video showing that the prominent disclosure was being displayed before requesting the runtime permission. The video needs to be uploaded to, say, YouTube and included in the Google Play console under App content->Permission declarations form->Video instructions. You also need to explain what triggers the request for background location permission.
Related
Our app for navigation: minSdkVersion 21, targetSdkVersion 30. We have no services in the background, we remove our updatelistener in onPause() and we request only location permission ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION, so we should never be even able to use a location in the background. So far the theory. In the App COntent section we indicated we indeed don't use locations in the background and there the questionnaire does not continue, as the interaction flow ended there successfully.
But Google just removed our app from the Play store as it believes it is violating the policy about using the device location in the background. The Developer Permission Declaration in de Play store has a Sensitive App Rights section mentioning "Location rights: not used in the background".
In interaction with Google - very cumbersome - we got this after weeks:
We found that your app is not compliant with the Location Permissions policy, or we were unable to review and verify your in-app experience for compliance with this policy.
If you have determined that your app does not require location in the background, complete the following steps to remove background usage and reach compliance:
For any APK targeting Android 10 or newer (SDK level 29 or higher):
Remove the ACCESS_BACKGROUND_LOCATION permission from your app APK or app bundle
[If minimum SDK level is 28 or lower] If you’re using ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION, examine your code paths and restrict usage to foreground purposes only (learn more)
You should no longer see the Location declaration listed under App Content
For any APK targeting Android 9 or older (SDK level 28 or lower):
If you’re already using ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION, examine your code paths and restrict usage to foreground purposes only (learn more)
In your console declaration, select “No” to the question “Does your app access location in the background in APKs or app bundles targeting Android 9 or older?”
We believe we did exactly that. ANy interaction over email takes days and always goes into a loop, back to square one.
Our questions:
Could it be that the MapBox library 6.6.0 uses locations in the background? We don't call their code to initialize any fetching of locations, as we update the map position ourselves.
Is there any way of determining where the violation - if at all - takes place?
Any other improvements that may help?
One month ago Google Play Console rejected my latest update and said that it is not compliant with the location in the background policies.
More precisely, the google email reports " If your app is not eligible to access location in the background or does not meet requirements for accessing location in the background, please remove the permission from your manifest and in-app functionality."
I used the background location permission for scanning BLE in ionic app (https://github.com/don/cordova-plugin-ble-central ).
I removed the background location permission (ACCESS_BACKGROUND_LOCATION) from cordova plugin because, after some test, is effectively not really necessary. However, are necessary other location permission (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION) so I would like to know if is equally necessary to display a prominent disclosure through a pop-up alert before my app’s location runtime permission.
I tried to send an issue ticket to google developer support on April 14th, but I have not received a reply.
If you target Android API version 28 or lower, ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION implicitly implies background location permission and you must hence follow all the rules for that.
If you target Android API version 29 or higher and do not have ACCESS_BACKGROUND_LOCATION in your manifest, you will automatically comply to Google Play's background policies (since you are then not affected by them).
I updated my application and submitted it to Google for publication on the Play store. Google wants me to fill in a Permissions Declaration form for coarse location permissions. Coarse location permission appears to be required by blue tooth communications for a reason not understood by me.
My application itself does not use any location information. I am trying to fill out the declaration as best I can but it is also requiring a 30 second video targeting consumers letting them know what and why location is being used.
Does anyone have insight into how to explain this to consumers?
I have an app which contains <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Is there a way to delay asking the user for the location permission until they take an account which requires it? I've tried removing uses-permission from the XML, this breaks location even after programmatically asking for location permissions.
I do programmatically ask for location info, but that only seems to work if the permission is also specified in the XML.
I am assuming that you are experiencing this as you're targeting below Android 6.0?
As per the docs
Android 6.0 Marshmallow introduced a new permissions model that lets
apps request permissions from the user at runtime, rather than prior
to installation. Apps that support the new model request permissions
when the app actually requires the services or data protected by the
services.
Therefore, you will be unable to avoid requesting permissions before the user actually needs to use that particular service, unless you target a higher API level.
If you need permission, you can not remove it from manifest. If your target API is above 23 (Android 6) Just ask for permission programmatically when you need it. You as developer determine when to ask for permissions.
Otherwise if user's device is below android 6 or if your target API is below 23 then permissions will be requested at install time and you can not change it.
I have just started working on a android project and is using the Google Map API.
I am able to fetch the map on my app but when i try to enable the current location with map.setMyLocationEnabled(true);, the app says unfortunately app has stopped working.
When I removed the line map.setMyLocationEnabled(true); then it worked fine. Can anyone please help me to get the current location button enabled.
If you are using android 6.0 or above, you should:
Make sure you added ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION in your AndroidManifest file.
You need to check permission at run-time in this link: Requesting Permission
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. This approach streamlines the app install process, since the user does not need to grant permissions when they install or update the app. It also gives the user more control over the app's functionality;
If you want an easy-to-use library for permission checking, I suggest Permission Dispatcher.
According to this, you need to have requested permission for either ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION.
My guess is you haven't and your app is throwing a SecurityException.