capacitor-plugins
capacitor-plugins copied to clipboard
Android 13 (API level 33) introduces a new runtime permission for notifications
Feature Request
Android 13 (API level 33) introduces a new runtime permission for sending non-exempt notifications from an app: POST_NOTIFICATIONS.
Plugin
Currently this plugin doesn't work when we set notifications because user don't see runtime permission popup on Android 13.
Preferred Solution
-
I have implemented this fix for Cordova in this repo cordova-plugin-local-notification-12
-
I have added few changes to get permission popup FIX
-
The permission that you need to declare in your app's manifest file appears in the following code snippet:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
Additional Context
@jcesarmobile any update?
Local notifications are working fine on Android 13 devices as long as the app uses target SDK 32, which is the officially supported SDK of Capacitor 4. If you target SDK 32 and use notifications the app prompts for permission automatically on first app startup automatically.
If you target SDK 33 then you'll need to do the changes made on this PR https://github.com/ionic-team/capacitor-plugins/pull/1189