【问题标题】:How to show image in firebase push notification in flutter如何在颤动的firebase推送通知中显示图像
【发布时间】:2021-04-13 22:28:33
【问题描述】:

我想在颤动的推送通知中显示图像。我在来自服务器的消息对象中有图像 url,使用这个 url 我想在 android 和 iOS 设备中使用图像。我怎么能在颤动中做到这一点。任何帮助表示赞赏。

【问题讨论】:

  • 你实现了吗?如果有,怎么做?

标签: flutter push-notification firebase-cloud-messaging


【解决方案1】:
【解决方案2】:

在此处查看有关图像的 firebase 文档: https://firebase.google.com/docs/cloud-messaging/ios/send-image

如果使用云存储,则图像有 300KB 的限制和额外的报价限制。

【讨论】:

  • 是的,我已阅读文档,但我没有使用云存储,图像存储在我的服务器中。
【解决方案3】:

这是firebase_messaging 包中的内置功能。

您需要做的就是在通知负载中设置图像以及其他值,例如 bodytitle 等等

参考:https://firebase.google.com/docs/cloud-messaging/android/send-imagehttps://developer.android.com/training/notify-user/expanded

【讨论】:

    猜你喜欢
    • 2021-01-25
    • 2016-10-16
    • 1970-01-01
    • 2020-06-26
    • 2021-05-22
    • 2015-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多