I am using firebase notification module in my react-native application. It works perfectly in emulator but when I install the app in mobile, onNotificationOpened event listener never gets called when I open the notification. what am i missing ?
Environment
- Development Operating System: Windows
Build Tools:
- React Native version: 0.60.5
- React Native Firebase Version: 5.5.6
- Firebase Module: notifications
Code Snippet:
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
Linking.openURL('https://www.google.com/');
});
/*
* If your app is closed, you can check if it was opened by a notification being clicked / tapped / opened as follows:
* */
const notificationOpen = await firebase.notifications().getInitialNotification();
if (notificationOpen) {
Linking.openURL('https://www.google.com/');
}