added logs for notification receiving

This commit is contained in:
Nouman Tahir 2021-05-26 13:02:13 +05:00
parent b5f72ad000
commit 83b2da00e2

View File

@ -479,12 +479,14 @@ class ApplicationContainer extends Component {
PushNotification.cancelAllLocalNotifications(); PushNotification.cancelAllLocalNotifications();
firebaseOnMessageListener = messaging().onMessage((remoteMessage) => { firebaseOnMessageListener = messaging().onMessage((remoteMessage) => {
console.log('Notification Received: foreground', remoteMessage);
this._showNotificationToast(remoteMessage); this._showNotificationToast(remoteMessage);
this._pushNavigate(remoteMessage); this._pushNavigate(remoteMessage);
}); });
firebaseOnNotificationOpenedAppListener = messaging().onNotificationOpenedApp( firebaseOnNotificationOpenedAppListener = messaging().onNotificationOpenedApp(
(remoteMessage) => { (remoteMessage) => {
console.log('Notification Received, notification oped app:', remoteMessage);
this._pushNavigate(remoteMessage); this._pushNavigate(remoteMessage);
}, },
); );