feat(android_alarm_manager_plus) Handle Android 12 behavior changes#580
Merged
miquelbeltran merged 7 commits intofluttercommunity:mainfrom Oct 27, 2021
Merged
Conversation
…ck new permission
…simplify check for exact alarm scheduling permission
miquelbeltran
approved these changes
Oct 27, 2021
Member
miquelbeltran
left a comment
There was a problem hiding this comment.
Thanks a lot for your awesome contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Android 12 introduced some behavior changes for scheduling exact alarms. Also, Alarm manager plugin recently had some internal updates to target Android 12, but no changes to the
AlarmServicelogic were done.This PR updates the plugin to check if app still has permission to schedule exact alarms before trying to schedule one, so users won't see
SecurityException.Additionally, I did some updates to plugin documentation as it seems quite outdated due to recent changes.
Related Issues
No related issues so far due to not many apps switching to target SDK 31, I believe.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]).This will ensure a smooth and quick review process. Updating the
pubspec.yamland changelogs is not required.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?