Join image to Push notification
-
Hello Kl3m3n,
Push notifications are an excellent function for alerting processes or failures. Every time I think about it, it comes to me the idea that it can be added a link to it, like i.imgur.com which when clicked on this would be loaded and displayed. Later perhaps streaming too.
This is only a question for kl3m3n, is it possible?Regards
-
@Sato Why would you need this for example? Does this mean, you would need to upload a new image to e.g., imgur for every push notification?
Yes, including a link should be possible. Including a stream is not possible (at least not directly into push notification).
But I don't see a good use case for a url link in GUI-O application push notifications. Maybe if you explain a bit more.
Which push notification: IoT or FCM (or both)?
Regards,
Klemen -
Hello @kl3m3n,
It would be useful in many cases if certain push notifications could also show an image in addition to the text.
Yes both, IOT and FCM if possible.
Of course, we could send a link in the text, but that would have the disadvantage of having to copy that link and open a browser to view the image. What I was thinking was that Gui-O could automatically open the image in the notification or separately within a rectangle."this mean, you would need to upload a new image to e.g., imgur for every push notification?"
Not for every, only for ones that we can choose, like for SOS type.But if you don't think it's useful or difficult to implement, please drop the subject.
Regards
-
Hello @kl3m3n,
Back to the subject.
The idea is to visually enhance the notification. You don't need to upload an image but perhaps if you could add an icon to the notification, you'd achieve the same goal. There be exist a few icons and we could always choose which one we want to use for each notification.
Icons like for SOS, Max temp, Stop, Danger, etc.Please give feedback if it's possible and if you're going to implement it.
Thank you
Regards -
@Sato Hello.
For FCM push notifications you can set the image url and the image will be displayed. GUI-O app upgrade is not needed. I only had to modify the backend server code.
Just add a json key-value pair to the request:
"messageImageUrl": "<image_url>"
For example in Arduino:
jsonPayload["messageImageUrl"] = "<url_string>";
I will update the examples on the web.
If you don't want the image, just don't add the key-value pair (or set the value to empty / null string).
NOTE: The IoT push notifications do not support this (and no support for this will be added).
P.S.: Image size (bytes) should be kept as small as possible. Supports jpeg, png, bmp.
Best regards,
Klemen -
-
@Sato The examples are updated.
https://www.gui-o.com/examples/gui-o-push-notifications
Regards,
Klemen -
-
I tested notifications with new functionality. Very useful.
@kl3m3n Great job. -
@Hub Thanks