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

[WIP]Initial runtime permissions for android #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

barryvdh
Copy link

Initial implementation for #110
Based on https://cordova.apache.org/docs/en/dev/guide/platforms/android/plugin.html

Done:

  • Implement requestAlwaysAuthorization for Android 6
  • Ask permission, return result in js callback

Current problems:

  • request is not blocking, so the callbacks need to be used. But these are not working on all versions. I suggest that, when the function is not available (eg ios7), it always executes the success callback. This is a breaking change however.
  • I only changed 2 examples to use the callback yet.
  • Code style is messed up from switchting editors, but hope you get the idea :(
  • Check on older Android? Always run success callback?

@barryvdh
Copy link
Author

The correct way to handle this would be upgrading to Android SDK 0.10.x and using the new SystemRequirementsChecker (introduced in 0.9)

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

Successfully merging this pull request may close these issues.

1 participant