【问题标题】:Push notification in mutiple platforms using Amazon SNS API使用 Amazon SNS API 在多个平台中推送通知
【发布时间】:2015-12-15 11:12:59
【问题描述】:

我想同时向多个平台(Android 和 iOS)发送相同的消息。我如何使用 Amazon SNS API 来实现这一点。谁能建议任何有用的链接? 我需要类似下面的东西。但我不知道如何发布这个 meaasge。因为每个平台我们都有不同的 Endpoint ARN。另外我想知道创建主题的需要是什么?

{ 
"default": "This is the default message which must be present when publishing a message to a topic. The default message will only be used if a message is not present for 
one of the notification platforms.",     
"APNS": "{\"aps\":{\"alert\": \"Check out these awesome deals!\",\"url\":\"www.amazon.com\"} }",
"GCM":"{\"data\":{\"message\":\"Check out these awesome deals!\",\"url\":\"www.amazon.com\"}}",
"ADM": "{ \"data\": { \"message\": \"Check out these awesome deals!\",\"url\":\"www.amazon.com\" }}" 
}

【问题讨论】:

    标签: java android ios push-notification amazon-sns


    【解决方案1】:

    您应该参考http://docs.aws.amazon.com/sns/latest/dg/sns-dg.pdf。这包含您需要的信息。

    主题就像用户可以订阅的特定频道,您可以向其发布通知。您可以创建多个主题并让用户订阅他们在应用程序中想要的主题。例如在新闻应用程序中,人们可以订阅不同的新闻类别,您可以将与特定新闻类别相关的通知发送到该主题 ARN。只有订阅该主题的人才能收到该通知。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多