Perform Action while app is not running after getting Push Notification


#1

I am building an application in IONIC 2 which is similar to WhatsApp. In this application when an user sends a message, it shows single tick and when the message is received by the recipient, it is converted into double ticks at sender’s end and its happening even if the app is not running. Also, we noticed that when a notification is received at the recipient, the tick is at the sender’s end is converted into double tick. So, I assume that the app at the recipient end detects the notification event if it is not running and somehow update the server.
So, I used FCM plugin for notification in both iOS and Android but I am not able to detect the receipt of the notification when the app is not running.
It would be great help if anybody can suggest any solution to this issue?