I am able to receive the notification with action button using phonegap plugin. However, I am not able to open the app when I click on notification.
I have checked following parameter in config.xml
android:launchMode="singleTop"
I have tried various payloads. I am using postman to send these notification. I am able to open the app when i use following payload(Supported by FCM) but I don't receive action buttons.
{
"registration_ids": ["dG7v71qgTtQ:APA91bGzfypc_bf-YZ_Gzayqoit4b4DeAZpCaTvPq5Cw3XqTClEFVkgTvvIZCkJVPXIa6-iLnzSrLuFO39SN-kCypBkkxklBIkf4qyYb1WWRZV4qVpR7sMKsNE3tNqtvd6m-ierZxRT6"],
"notification": {
"title": "My title",
"message": "My message."
},
"data": {
"actions": [
{ "title": "Accept", "callback": "app.accept", "foreground": true},
{ "title": "Ignore", "callback": "app.ignore", "foreground": false}
]
}
}
When I use following payload I receive action buttons notification. But not able to open the app when user clicks the notification!
{
"registration_ids": ["dG7v71qgTtQ:APA91bGzfypc_bf-YZ_Gzayqoit4b4DeAZpCaTvPq5Cw3XqTClEFVkgTvvIZCkJVPXIa6-iLnzSrLuFO39SN-kCypBkkxklBIkf4qyYb1WWRZV4qVpR7sMKsNE3tNqtvd6m-ierZxRT6"],
"data": {
"title": "AUX Scrum",
"message": "agenda.",
"actions": [
{
"icon": "emailGuests",
"title": "EMAIL GUESTS",
"callback": "emailGuests",
"foreground": true
},
{
"icon": "snooze",
"title": "SNOOZE",
"callback": "snooze",
"foreground": false
}
]
}
}
Expected result: User should be able to receive action button push notification and clicking notification opens the app.
Actual Result: User receive action button notification, but on clicking notification, Notification is closed and app is not opened( Even if App is in Foreground or background)