【发布时间】:2021-03-28 16:54:39
【问题描述】:
对于一个应用程序,我在 android 设备上有多个类别的通知,如屏幕截图所示。
类别设置不同,有些节目的灯光,有些播放自定义声音等
将通知传递到具有类别的应用程序的适当有效负载应该是什么。我试过了
{
"notification":{
"title":"Contact Pulse",
"body":"This is a sample notification delivered by Azure Notification Hubs.",
"category": "Local Notifications" // tried with this
},
"category": "Local Notifications" // tried with this as well
}
预期的最终结果是当类别为“本地通知”时,播放自定义声音而其他类别静音。 在每种情况下都会发送通知,但它的行为与频道配置不同。
注意:上述场景适用于数据:{}(在应用级别处理),但不适用于通知:{}。
【问题讨论】: