How to detect app open from push notification in ionic 3?


Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

cli packages: (C:\Users\lenovo\AppData\Roaming\npm\node_modules)

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:

cordova (Cordova CLI) : 8.0.0
local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2

Android SDK Tools : 26.1.1
Node : v8.11.2
npm : 5.6.0
OS : Windows 10
Environment Variables:


backend : pro
Describe the Bug
Hi i am developing application related to chat. In this application consist of two pages first page consist of list of user contacts and when click on particular contact navigate to the message screen. when user close the app then he/she will receive push notification then i need to navigate the user to message screen but i am unable to do it.

this.fcm.onNotification().subscribe this function is executing after setting root page. so without navigate to root page i want to navigate to message page.

Please help me out to resolve the issue.