2

I am working on Ionic app and building push notification using phonegap push. I want to show banner when app is on foreground with iOS. (I was able to show banner on foreground with option 'forceshow' -- Android)

Any example or advice would be appreciated.(i.e. an example of how to manipulate views on notification event) Thank you.

smchae
  • 1,035
  • 3
  • 17
  • 39
  • Are you able to manage the "push.on('notification', function (data)" event? I use this event to make what you need, but I do it with DevExtreme, not ionic. – Piero Alberto Sep 06 '17 at 08:13

1 Answers1

0

It works for me with this payload:

{
    "registration_ids":["device token"],
    "content_available": true,
    "notification" : {
        "force-start": "1",
        "content-available": "1",
        "no-cache": "1",
        "body":"Test" ,
        "title" : "Test",
        "sound" : "default" ,
        "icon":"default",
        "badge": 5
    },
    "priority":10
}

use badge only if you want the number to be displayed on your app icon.