zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.73k stars 2.05k forks source link

onNotification is not triggered when app is in killed state in android. #2363

Open Ambreen-Kanwal20 opened 1 year ago

Ambreen-Kanwal20 commented 1 year ago

I am able to receive the locally scheduled notifications for both Android and IOS and I am trying to navigate the user to screens according to the type of notification when the user taps on the notification. IOS works fine but on Android when I receive the notification in killed state, then onNotification is not working in some android phones. It works fine in realme with OS version 13 but not in xiaomi with OS version 13 and vivo with OS version 12. Kindly help me to fix this issue.

mavudai-tonik commented 11 months ago

We're also facing the same issue, Is there is any solution to resolve it?

ksetrin commented 2 days ago

We're also facing the same issue, Is there is any solution to resolve it?

I've spent hours trying to figure out the problem. But it turned out to be simple but not at all obvious. Here's the solution that worked for me