【问题标题】:Unable to set action for mobile and web platform无法为移动和网络平台设置操作
【发布时间】:2019-05-14 11:59:16
【问题描述】:

我们使用 Airship API 在移动和网络平台上发送推送通知,对于深度链接,我们使用类似的操作

"notification": {
    "actions": {
        "open": {
            "type": "deep_link",
            "content": "https://www.urbanairship.com/settings",
        }
    }
}

网络操作是:

"notification": {
    "actions": {
        "open": {
            "type": "url",
            "content": "http://www.urbanairship.com"
        }
    },
}

以上参数可以单独使用,但我们希望将两个参数一起使用,就像附加的屏幕截图“screenshot.png”一样。我们没有在文档中找到任何解决方案,这些解决方案显示了如何同时使用深度链接和 Web 操作,与附加的屏幕截图相同。那么您能否建议我们如何合并这些参数,以便我们可以同时使用针对移动设备的深度链接操作和针对网站的 Web 操作?

【问题讨论】:

    标签: php push-notification urbanairship.com


    【解决方案1】:

    我已经解决了这个问题,可能对某人有用。

    这是一个示例负载:

    {
        "audience": "all",
        "device_types": ["ios", "android", "web"],
        "notification": {
            "alert": "Opening this message will open a defined deep link.",
            "actions": {
                "open": {
                    "type": "deep_link",
                    "content": "prefs",  // for mobile platform
                    "fallback_url": "https://airship.com" // for web platform
                }
            }
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2012-01-11
      • 2017-04-02
      • 1970-01-01
      • 2020-08-28
      • 2017-03-17
      • 2012-03-02
      • 1970-01-01
      • 2022-09-05
      • 1970-01-01
      相关资源
      最近更新 更多