I am using notifee to create notifications in a react native app. I noticed, by default notifications get blocked by android (See under Settings->Apps->My App). Do I have to set the permission somewhere in my app?
When I enable notifications in the Apps-Settings, they work fine, but I’d like them to be enabled when installing the apk.
2
Answers
Yes, You have to explicitly request notifications permission if you targets Android 13.
Paste the following line in AndroidManifest.xml:
And then in your app:
Permission could be named "POST_NOTIFICATION" or "POST_NOTIFICATIONS", depending on your RN version.
There is no need to request notification permission explicitly in android, even
POST_NOTIFICATION
is also deprecated,In android by default notification is enabled, until & unless you turnoff forcefully, for a simple solution,
as you are using notifee, I will recommend using
requestPermission function inside your parent/App.js component