Skip to content
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 canMockLocation Does Not Check If Permission Is Granted #115

Open
kcchoate opened this issue Dec 9, 2021 · 0 comments
Open

Android canMockLocation Does Not Check If Permission Is Granted #115

kcchoate opened this issue Dec 9, 2021 · 0 comments

Comments

@kcchoate
Copy link

kcchoate commented Dec 9, 2021

The canMockLocation implementation for Android only checks to see if another app is installed which requests the android.permission.ACCESS_MOCK_LOCATION permission. It does not check to see if that permission is granted. I believe this can be accomplished using the requestedPermissionsFlags field of the PackageInfo object (seen here: https://developer.android.com/reference/android/content/pm/PackageInfo#requestedPermissionsFlags). Could we see an enhancement to either 1) always confirm that the permission is granted before returning true, or 2) allow for passing in a flag to indicate that the permission must be granted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant