How to save fcm notification in storage when app is closed

I am using ionic 4. And FCM plugin to receive notifications.
I am trying to save notification in storage. When app is open i am able to save notification. Also when user tap on the notification app will launch and am able to save notification data.
But when app is closed and user swipe or clear notification i didn’t get that data in app.
Is there any way to save notification when it is received?

Please help me. Searching for this issue from last two weeks but didn’t found any solution. Please help.

I’m also facing this same problem with the native FCM plugin. Did you find a way on how to do this?

No, i think need to create custom plugin

Do you have any backend, like firebase? Use the backend to process (firebase functions) and save notifications

Don’t have firebase data base. Fcm is used for sending only notification. Database is hosted on other server. Some one suggest to use capacitor to achieve this or use service for notification listener

Have you tried with two different payload i.e. notification payload and data payload ?
are you using content_type property in your payload ?

Payload data is accessible only if we click notification.