1

I just want to know that is it possible to have image push notifications in ionic ,As i found some links but they are not answered yet

Here are links :-

1) Sending image in push notification to Android phones using phonegap plugin

2) Pushing pictures with push notifications (ngCordova, Angular, Ionic)

If , yes then can anyone give me reference link

Thanks

Community
  • 1
  • 1
sid
  • 1,116
  • 1
  • 10
  • 27

1 Answers1

1

Yes you can send Image in push Notification in Cordova. If you are using Phonegap push plugin take a look at - Push notification payload details,

{
    "registration_ids": ["my device id"],
    "data": {
        "title": "Big Picture",
        "message": "This is my big picture message",
        "style": "picture",
        "picture": "http://36.media.tumblr.com/c066cc2238103856c9ac506faa6f3bc2/tumblr_nmstmqtuo81tssmyno1_1280.jpg",
        "summaryText": "The internet is built on cat pictures"
    }
} 

You can see that the attribute image is used to send Large-icon in Notification panel. If you want to sent Big-picture or Image in Notification use "style" : "picture" and sent picture URL with Summary text.

Nehil Mistry
  • 1,101
  • 2
  • 22
  • 51
  • Is there any way to do it form ionic dashboard? In payload field of ionic dashboard, I used these pairs but it received just like normal notification. – Vivek Sinha Jun 30 '17 at 06:53