【问题标题】:Flutter firebase messaging push notification format 3 linesFlutter firebase 消息推送通知格式 3 行
【发布时间】:2020-05-09 17:06:58
【问题描述】:

我正在为我的项目处理 firebase 推送通知。我在所有设备上都收到了通知。

我的问题是 iOS 设备以以下格式显示通知。

Title  :
Subtitle :
text/body:

我的 android 设备以以下格式显示通知。

Title :
text/body:

以下是我用于发送通知的有效负载。

 var payload = {   "notification":{
          "title":"New Price Alert! "+ clientDataAfter.productname,
"subtitle":"Get before its gone",
          "body":"Old Price "+clientDataAfter.oldprice+" || New Price "+ clientDataAfter.newprice,
          "click_action":"FLUTTER_NOTIFICATION_CLICK",
        },
        "data" : {
          "id":ID,
          "name": Name,
          "newprice":newprice
        }, }

我想在 iOS 和 android 上以 3 行格式显示通知。 我怎样才能做到这一点?

提前致谢。

【问题讨论】:

  • 您好..等待答复...

标签: android firebase flutter firebase-cloud-messaging firebase-notifications


【解决方案1】:

用“id”、“name”、...为“data”添加“subtitle”

【讨论】:

    猜你喜欢
    • 2020-06-05
    • 1970-01-01
    • 1970-01-01
    • 2017-10-10
    • 2021-06-13
    • 2016-12-13
    • 1970-01-01
    • 1970-01-01
    • 2018-01-21
    相关资源
    最近更新 更多