Description
Hi all, I'm having issue when opening Pusher notification from the system tray.
When quitting app with hardware back button, app is showing white blank screen (only happens after launching app from tapping on push notification). The blank screen doesn’t have bottom tab, seem to be not related to navigation. I've tried to log react navigation stack before quitting but showing only 1 route in the stack. Seems to be on native side issue.
I've also tried with all types of launchMode
in AndroidManifest.xml
but still getting same behaviour. When launch app normally, this issue doesn't happen. As I couldn't find ways to fix it, I was thinking to disable the Android back button only when the app is launched from opening notification. However, I can't find the listener that will triggered when tap to open the notification.
const channel = PUSHER.subscribe(thread.id);
channel.bind('new-message', function (data: any) {
//triggered when receive notification
console.log('new message has come through', data);
}
return () => {
PUSHER.unsubscribe(thread.id);
};
Update:
Suspect it's due to additional OpenNotificationActivity
attached before MainActivity
after checking out logcat. But still not sure how to disable/bypass the notification activity from push-notifications-android