-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Android - Push notifications not received when app is closed (Killed/Terminated/etc) #2401
Comments
Check if you've asked for permissions for notifications. |
Thanks @akshayhalasangi but I have double checked that part, still nothing. Due to my version of react-native I followed this these steps. The app receives notifications when in background or foreground but not when it is closed. |
do you do PushNotification.configure in App.js or index.js? |
The same problem. PushNotification.configure is in index.js. Working on Android less then 13. Push notifications work when the app is in the foreground. Once it's off or in the background and a notification comes in, it kills the app. Set environment according to https://dev.to/gautham495/asking-notification-permission-in-android-13-for-a-react-native-application-35n2 |
this solved my problem: app/src/main/AndroidManifest.xml android/app/build.gradle android/build.gradle buildToolsVersion = "30.0.2" And check permissions: good luck to everyone! Radek |
Hey all folks here by spending over a day I have found a solution , FCM override function OnMessageRecieved will not call when app is killed , so you have to override Onhandleintent function inside your FCM . And from there you can add logic inside that function to show custom notification on the screen .🙂 |
When the app is closed, receiving notifications will be delayed. It can be 3 to 5 minutes. |
Question
Hello,
I've been using this package for quite a while but we've just noticed the our app is receiving foreground and background notifications but none is received when the app is closed. Below you can find my RN and this library versions, as well as some part of my android manifest file. Am I missing something?
package.json
"react-native": "~0.63.5",
"react-native-push-notification": "8.1.1",
Android manifest
The text was updated successfully, but these errors were encountered: