Reputation: 663
We're using phonegap push plugin to send interactive push notifications (with buttons). Documentation suggests using "content-available" in the payload for background notifications.
However, even with content-available value set; when user clicks on the push notification button the plugin loads the application and shows the login page. Below is a sample push notification payload.
{
"data" : {
"title":"Test title",
"message":"Test message",
"content-available": "1",
"actions": [{ icon: "", title: "APPROVE", callback: "approve"},
{ icon: "",title: "DENY", callback: "deny"}
]
}
}
Callback functions (approve, deny in the above sample) are fired and push action buttons are handled appropriately.
My question is:
How can the app handle push notification action buttons in the background WITHOUT loading the app and showing the login screen?
Are there any other push plugins that can handle this scenario?
Desired workflow:
Thanks.
Upvotes: 2
Views: 1796