【问题标题】:How to set priority to the notification using HMS Push Kit?如何使用 HMS Push Kit 设置通知的优先级?
【发布时间】:2021-02-17 02:54:04
【问题描述】:

当我发送推送通知时,我想为其设置优先级。 我检查了参考链接: https://developer.huawei.com/consumer/en/doc/development/HMS-3-References/push-server-send#BadgeNotification

但我找不到设置优先级的确切位置。

我正在使用这种 JSON 格式:

{
"validate_only": false,
"message": {
"notification": {
"title": "Big News",
"body": "This is a Big News!"
},
"android": {
"notification": {
"title": "Noti in Noti title",
"body": "Noti in Noti body",
"click_action": {
"type": 1,
"intent": "#Intent;compo=com.rvr/.Activity;S.W=U;end"
}
}
},
"token":  ["AAWWHI94sgUR2RU5_P1ZptUiwLq7W8XWJO2LxaAPuXw4_HOJFXnBlN-q5_3bwlxVW_SHeDPx_s5bWW-9DjtWZsvcm9CwXe1FHJg0u-D2pcQPcb3sTxDTJeiwEb9WBPl_9w"]
}
}

请提供一些参考帮助我。

【问题讨论】:

    标签: push-notification huawei-mobile-services


    【解决方案1】:

    发布的参考链接适用于旧的 HMS 版本 3 文档。请参考latest document

    在AndroidConfig Structure部分下,有一个Urgency参数用于设置消息传递优先级:

    在AndroidNotification Structure部分下,有一个Importance参数用于设置消息通知的优先级。

    【讨论】:

    • 似乎这不再适用了。在文档的current version 中,没有urgency 字段,也没有importance 字段的HIGH 选项。
    猜你喜欢
    • 2021-04-06
    • 2021-03-08
    • 1970-01-01
    • 1970-01-01
    • 2021-07-11
    • 1970-01-01
    • 1970-01-01
    • 2020-09-15
    • 1970-01-01
    相关资源
    最近更新 更多