evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

Not able to receive the data from push notification when application is in background #1031

Closed Amit2530 closed 5 years ago

Amit2530 commented 5 years ago

When app is in background and receiving notification but when i click on that notification FCM.getInitialeNotification() method is got called but im not able to receive any data.

below is the response which is im getting from the FCM.getInitialNotification() -->

{
opened_from_tray:1, fcm: { action: "android.intent.action.MAIN" }, collapse_key:"com.example", google.message_id:"0:1535113432734484%dacdbdd9dacdbdd9", google.priority:"high", }

evollu commented 5 years ago

When app is in background and receiving notification when app is live, notification goes into callback method

Sumit-Chakole commented 5 years ago

I have same issue? I get notification data when app is running (in callback) but when app is not running and notification arrives, it shown in notification panel but data is not received in getInitialNotification() method when clicked on notification.

Please let me know how to solve this