How to add title, action buttons in ionic push notification

I use push notifications using ionic structure. I am following the push submission provided in the ion system documentation. Accordingly, the send request should look like

{ "tokens":[ "b284a6f7545368d2d3f753263e3e2f2b7795be5263ed7c95017f628730edeaad", "d609f7cba82fdd0a568d5ada649cddc5ebb65f08e7fc72599d8d47390bfc0f20" ], "notification":{ "alert":"Hello World!", "ios":{ "badge":1, "sound":"ping.aiff", "expiry": 1423238641, "priority": 10, "contentAvailable": true, "payload":{ "key1":"value", "key2":"value" } }, "android":{ "collapseKey":"foo", "delayWhileIdle":true, "timeToLive":300, "payload":{ "key1":"value", "key2":"value" } } } } 

I want the ios notification to have names, bodies and action buttons, e.g.

 "alert" : { "body" : "This is a message from server", "action-loc-key" : "VIEW", "action" : [ { "id" : "buttonTapped", "title" : "View" } ] } 

Is this possible with ionic push notification? Any help please, or any other APIs that do this?

+5
source share

All Articles