-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Introduce ACTIVITY_RECOGNITION runtime permission #430
Conversation
I have tested this PR and it works correctly in all Android version, except Android 11 (API 30).
Returns the following statuses without requesting the permissions:
In all other versions of OS it works correctly. Could you tell me if I'm making a mistake? |
Could this potentially be due to the Physical Activity permission only having the possible state of 'Allow' or 'Deny', as opposed to the Location permission having 4 states: 'Allow all the time', 'Allow only while using the app', 'Ask every time' and 'Deny'? |
Could be. What test should I take to find out if it is? |
If I request all the permissions together in an array (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION and ACTIVITY_RECOGNITION) the error occurs. I mean, the permissions are not required and the status "DENIED_ONCE" is returned for each of them.. |
Seems like it might be an error more underlying to how this plugin makes requests for multiple permissions at this point Unfortunately don't have the time to spend on this at the moment as it works for the use case when calling individually, maybe we put a caveat on it and say it only works when being called on it's own? A workaround for your use case would be to request all the others together and the physical activity permission on it's own? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
PR Type
What kind of change does this PR introduce?
PR Checklist
For bug fixes / features, please check if your PR fulfills the following requirements:
What is the purpose of this PR?
Add ability to request ACTIVITY_RECOGNITION run time permission: https://developer.android.com/about/versions/10/privacy/changes#physical-activity-recognition
Does this PR introduce a breaking change?
What testing has been done on the changes in the PR?
I have installed this branch of PR in my app and works as expected with the
cordova.plugins.diagnostic.requestRuntimePermission
function.What testing has been done on existing functionality?
Other information