Xamamrin form : How to recieve notification from firebase console with image

I want to send notification to device token from firebase console with image, for example notification should be display like this.
Title
Body
Image // here is the issue i want to display image from url now when i get notification now i get url how i can convert url and display image.

My code for send notificaiton is this and i am sending from POSTMAN

{ "data":{
     "title":"New Notification!",
     "body":"Test\",
     "user_id": "1234",
        "image": "http://pngimg.com/uploads/google/google_PNG19645.png"
 },
"to" : "device_token" }

here is the image for notification i am currently getting and you can see clearly that i am getting url instead of image

enter image description here

Best Answers

Answers

  • Xami3Xami3 PKMember, University ✭✭✭

    what if you convert to base64 string, pass into payload and on app side , convert it back to its original source.

  • veezo2007pkveezo2007pk Member ✭✭

    sendNotification where is this method come from?

  • veezo2007pkveezo2007pk Member ✭✭
    edited August 2018

    so what will be my code in json for image url?
    currently i am sending notification with this code

    { "data":{
    "title":"New Notification!",
    "body":"Test\",
    "user_id": "1234",
    "image": "http://pngimg.com/uploads/google/google_PNG19645.png"
    },
    "to" : "device_token" }

  • veezo2007pkveezo2007pk Member ✭✭

    yes i followed that link i just want to know to send image with notification what will be my json code?
    in GetBitmapfromUrl??

  • NightFuryNightFury Member ✭✭✭

    @veezo2007pk said:

    Hope you have solved your issue.

    cheers.
    Happy Coding.

  • veezo2007pkveezo2007pk Member ✭✭

    can u help me how its gonna implement in ios?

  • NightFuryNightFury Member ✭✭✭

    I have never done this before in iOS let me figure it out then i will get back to you.

Sign In or Register to comment.