-
Notifications
You must be signed in to change notification settings - Fork 280
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
fix(android): Ask for POST_NOTIFICATIONS permission if necessary #238
fix(android): Ask for POST_NOTIFICATIONS permission if necessary #238
Conversation
🆙 |
While this PR is not accepted, I use its concepts on my fork of the original phonegap-plugin-push plugin (adapting the code, to the limit of my Java skills), and it works fine. |
Fix to request permission to post notifications taken from havesource#238
@uniquare Can you revert the changes you made in |
I've reverted the changes to |
I am not seeing merge conflicts anymore so I think you dont need to rebase :) I will merge this in, in a minute. I will quickly create a PR and merge in the bumping of the The requirement bump will be required to go with your changes which added the Older versions of Cordova does not work out of the box. I want to confirm are you using Cordova-Android 12? or are you changing the sdk build tools with preference flag? |
50d6d12
to
d8d1115
Compare
Sorry, I rebased in the meantime. Yes, I am using Cordova-Android 12.0.0. |
Adds a request for permission to post notifications (required for API 33). Taken from havesource#238
…esource#238) * fix(android): Ask for POST_NOTIFICATIONS permission if necessary --------- Co-authored-by: Daniel Zupan <daniel.zupan@uniquare.com>
…esource#238) * fix(android): Ask for POST_NOTIFICATIONS permission if necessary --------- Co-authored-by: Daniel Zupan <daniel.zupan@uniquare.com> (cherry picked from commit 66138f2)
Description
Adds the following permission to the AndroidManifest.xml:
Asks the user for permission to post notifications when the plugin is initialized if not already granted by the user.
Related Issue
#215
Motivation and Context
As stated in the issue, Android 13 requires an additional POST_NOTIFICATIONS permission to send non-exempt notifications from an app.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: