【问题标题】:notification hub using azure function使用 azure 功能的通知中心
【发布时间】:2017-04-11 08:58:05
【问题描述】:

如何使用集线器从 azure 函数发送通知:

context.bindings.notification = {
   message: "Hello from " + req.body.name
};

遇到错误。

所写的文件:

This example sends a notification for a template registration that contains

使用azure函数时如何注册模板?

【问题讨论】:

    标签: azure azure-notificationhub azure-functions


    【解决方案1】:

    首先,这是notification hub bindings docs的链接

    这是你需要做的:

    1. 来自移动客户端应用程序,register a template
      • 即{"aps": {"alert": "$(message)"}}
    2. 从 azure 函数发送模板负载。您应该在已注册模板的设备上收到推送
      • 即context.bindings.notification = { message: "this goes in the $(message) above" };

    【讨论】:

    • 发送需要toast XML模板的Windows 10应用怎么样?
    • 您可以通过将平台设置为 WNS 来发送 WNS 通知。示例代码见here
    猜你喜欢
    • 2013-12-29
    • 2021-08-03
    • 1970-01-01
    • 1970-01-01
    • 2014-03-06
    • 1970-01-01
    • 1970-01-01
    • 2017-03-09
    • 2019-08-25
    相关资源
    最近更新 更多