Android Question Push Notification Image

DonManfred

Expert
Licensed User
Longtime User
The Payload of a Push is limited to 4k. So transfering an image here is not a good idea.
Based on this you can just send a Notification with keywords. image-id or so. When the message arrives you can check the additional info and, if needed, download the file requested by it´s id.
 
Upvote 0

Jithesh Mepparambath

Member
Licensed User
Longtime User
hi,

can we send a small image and show the same in the notification , and once the user clicks , the process you have mentioned can be achieved.

so how i can process the image and show. can you share any sample codes.

regards

Jithesh M
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The code in the link is using a image url which is inside the notification.
Then an image is generated from that url and this image is used then.

This can be done with firebase notifications. But it must be build by you.

I suggest to learn how to use FB Notification and learn how you can use the values you can transport with the notification.

There is no code to show. Think over a solution for your project as it totally depends on your needs.
 
Upvote 0

Jithesh Mepparambath

Member
Licensed User
Longtime User
I think you all took my question wrong.

I agree with @manfred . once you receive the Image as url or as an ID , we can write code to retrieve. that will work fine .

But my question here is once you receive the Image , how we will show it in the Notification.

Since the Notification object doesn't have any option to show the image except Icon.

Dim n As Notification
n.Initialize
n.Icon = "icon"
n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
n.Notify(1)



@Erel your suggestion will be appreciated.

regards

Jithesh M
 
Upvote 0
Top