1

I currently have a ionic app that can successfully talk to a nodejs server. The app is a notification system using node-gcm. The issue with gcm is that you cannot send images. If you do, then the payload is too large. If you want to send an image, you have to send it via a url like "tumblr.com/.....". I currently do not want to handle a file system to host url's for the images. What I want to do is: 1) app takes an image and posts the image to the node server. (either base64 or url or whatever works).

2) the server then takes that image and sends it to another device via gcm

3) the other device receives the gcm and sees the image.

The only thing limiting me is the payload of gcm. So how exactly can I create a link like I am needing without using a filesystem?

Austin Hunter
  • 394
  • 6
  • 22

1 Answers1

0

Try the below json, it worked for me

{"regid": "registratioId whom do you want to send",
    "data": {
        "title": "your title",
        "message": "your message",
        "image": "link of the icon you want to set",  // this will be displayed as icon
        "style": "picture",
        "picture": "link of the picture/image you want to send",
        "summaryText": "summary text"
    }
}
G.Mounika
  • 385
  • 1
  • 3
  • 16
  • Yes I saw that in the documentation. My issue is that I don't have a link of the picture. The picture was taken on a device camera (base64) and is sent to a node server. I need a link to that photo. – Austin Hunter Oct 14 '16 at 14:24