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
feat(firebase_messaging, android)!: android 13 notifications permission request #9348
Conversation
@russellwheatley According to msackman's comment, I think we also need to update final boolean areNotificationsEnabled = ContextHolder.getApplicationContext().checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED; |
@MarcinusX That makes sense. I'll update the PR 👍 |
<!-- Permissions options for the `notification` group --> | ||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably mention this in the changelog for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can manually edit this when doing the next release I guess 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can change the squash message when merging from GitHub directly
Description
PR checks if the app is running on android 13 and will check the app notification permissions. If none set or permissions not granted, a dialog box will appear requesting user notification permission.
I consider this a breaking change as there is certain configuration required such as
targetSdkVersion
&compileSdkVersion
targeting android API 33.Users will also need to have the
android:exported="true"
property set in app manifest on apps running on android 12 or higher.Related Issues
closes #8720
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.yaml
and changelogs is not required.///
).melos run 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?