【问题标题】:Flutter iOS Rich Push Notification Image not displayFlutter iOS Rich Push Notification Image 不显示
【发布时间】:2021-02-10 10:32:15
【问题描述】:

Flutter 推送通知

我实现了推送通知,通知在 Flutter 中有图片链接。 在 Android 中,通知中心的图像会自动显示通知详细信息。 在 iOS 中,通知中心不显示图片,通知中心只显示通知详情。

请参阅推送通知的格式。卷曲通过,PHP 开发人员正在发送通知。我成功收到通知,但图像不会在 iOS 端自动显示,并且在 Android 中图像会自动显示 我已经添加了 "mutable-content": true 并且, 已经尝试在通知块中添加 "mutable-content": true 但没有成功

{
"to": "device token",
"mutable-content": true,
"notification": {
    "title": "Note 3",
    "body": "11:41",
    "click_action": "FLUTTER_NOTIFICATION_CLICK",
    "image": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png"
    
},
"data": {
    "notification_type": "Nice Thoughts",
    "post_details": {
        "message": "hello",
        "color": "#e0e0e0",
        "url": "www.recurpost.com",
        "img_url": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png",
        "video_url": "",
        "name": "abc xyz"
    }
},
"priority": "high"

}

【问题讨论】:

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


    【解决方案1】:

    您需要按照here 的描述创建通知服务扩展

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-04
      • 1970-01-01
      • 1970-01-01
      • 2019-05-16
      • 1970-01-01
      相关资源
      最近更新 更多