-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android 11 - Physical Activity Permission Denied if Location Permission Previously Requested #1216
Comments
I have a suspicion that it actually is prompting, but the prompts are stacked on each other and then since the 'allow all the time' prompt is above the physical activity, when it navigates to settings it sets the physical activity permission as denied. |
I've whittled this down to the scenario if Current workaround is to invoke |
From looking through the source code, as far as my understanding goes, this would live within the compiled |
In the end I ended up forking |
I don't want getCurrentPosition to request motion permission. Many others have expressed they don't want it. |
You want to use BackgroundGeolocation for requesting location permission. It's probably has better support for the new Android 11 permission policy. See Config.backgroundPermissionRationale. I doubt 3rd party permission plugin has that implemented. |
Happy to close this, I think the main part that I was missing was a method for invoking the Physical Activity permission request, but now that I've created one myself my use-case is sorted. That would be my only request for this plugin to include in it similar to |
Your Environment
cordova -v
): 10.0.0cordova platform ls
): android 9.0.0#ready
: (taken from sampleApp)Expected Behavior
If an app has already approved location permissions to be while in use or ask every time but not physical activity, upon configuring BackgroundGeolocation, the prompt for physical activity permission should appear before/after the request for background location services permission.
Actual Behavior
If an app has already approved location permissions to be while in use or ask every time but not physical activity, upon configuring BackgroundGeolocation, the request for background location services permission is shown but no physical activity permission prompt and physical activity is denied.
Steps to Reproduce
Context
We are using this plugin for an app, but the plugin is only configured and used for a specific feature; however location services is used for all users. So upon start we prompt for location services permissions and the prompt is shown, meaning that when the user goes to start the feature that uses this plugin, they are only prompted for background geolocation permissions and not physical activity. Since the documentation so heavily references the plugins reliance on the motion API, we'd like to prompt users with a native prompt rather than having to explain how to navigate into settings.
Debug logs
Logs
The text was updated successfully, but these errors were encountered: