question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onNotification is not called when a remote notification is pressed on Android

See original GitHub issue

Hi, onNotification is not get called when i press a notification. The doc https://github.com/zo0r/react-native-push-notification#usage says that onNotification Called when a remote or local notification is opened or received.

This callback is called twice when a notification is received: 1. {collapse_key: "XX" foreground: true google.delivered_priority: "high" google.message_id: "0:1587387492329033%3a743ff23a743ff2" google.original_priority: "high" google.sent_time: 1587387492305 google.ttl: 2419200 id: "-1393396919" issueId: "XX" notification: body: "XX" sound: "default" tag: "XX" title: "XX" userInteraction: false} 2. {foreground: true id: "-1409941121" issueId: "XX" message: "XX" title: "XX" userId: "XX" userInteraction: false}

Can anybody help me with this problem?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:94

github_iconTop GitHub Comments

1reaction
MarcoStb1993commented, May 4, 2020

@Dallas62 I opened a new issue since I think the one you mentioned describes a different problem. I hope this is ok.

1reaction
gibrandevcommented, Apr 29, 2020

@Dallas62 of course, I will make it ASAP, and give the report.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android onNotification never called in react-native-push ...
notification received form the server when i clicked on it app is opened but onNotification never called. i put this in componentDidMount() and ......
Read more >
Implementing React Native Push Notifications in Android Apps
This accepts an object with a required method onNotification . This method handles what happens after the notification is opened or received.
Read more >
react-native-push-notification Code Examples - Snyk
receivedNotification, // ANDROID ONLY: GCM Sender ID (optional - not required for local notifications, but is need to receive remote push notifications) ...
Read more >
react-native-push-notification - npm
NoData); }, // (optional) Called when Registered Action is pressed and invokeApp is false, if true onNotification will be called (Android) ...
Read more >
Handling Incoming Push Notifications in AWS Amplify - Medium
onNotification handler function is called when a push notification is received by the app. ... This process does not open the closed app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found