Clear FCM push notification from system tray

I’m working on an ionic mobile app and using FCM API to send push notification to this app.
When the app is in background, the notification is displayed in the system tray of the phone. When clicking on it, the user can launch the app.
However, if the user accesses the app from its icon launcher without clicking on the push notification, I wan to be able to clear all the displayed and not clicked notifications in the system tray.

Is there a proper way to do it ?


I am also facing the same issue.Can anyone please help me. Any help appreciated.

After hours of head breaking I found the solution,
“title”:“Notification title”,
“body”:“Notification body”,

"click_action":“FCM_PLUGIN_ACTIVITY” this is the mandatory parameter in the payload.

Can you share the code that cleans the notifications?