android - Message multiple platforms through AWS SNS with aws-ruby-sdk -


I am trying to use Amazon's Ruby SDK to send push notifications with additional features for different platforms. , I.e. APNS and GCM (apple and Android device), but I can not find any way to send document message structure using the SDK's API.

To send a message with various payloads for GCM and APNS, {"APS": {"APS": {"WARNING": "Someone makes us bombs"}}, "GCM I hope that the SNS send platform-specific payloads properly on the right platform end points. Will give, but instead the message, for example, an Android device, includes the APNS payload - full message in it The body is covered.

Here's how I am sending the message:

  sns = AWS :: SNS :: Client New S.publish (target_arring: endpoint_arrow, message : {GCM: ..., APNS: ...}. TO_JASON)  

For available documents, especially Ruby SDK, this does not seem to be detailed. Am I wrong in my assumption that payload should be delivered properly on the basis of endpoint platform? What am I trying to achieve?

Maybe you already thought this is out, but this is how it works on PHP The message structure is probably in Ruby:

  publish (array ('subject' = & gt; 'YOUR_TOPIC_ARN', 'message' = & gt; '{"default": "YOUR_MESSAGE "", "Email": "YOUR_MESSAGE", "YOUR_MESSAGE", "http": "YOUR_MESSAGE", "https": "YOUR_MESSAGE", "SMS": "YOUR_MESSAGE", "APNS": "{\" APS \ ": \" YOUR_MESSAGE \ ", \" sound \ ": \" default \ ", \" badge \ ": \" 1 \ "}}", "gcm": " {\ "Data \": {\ "message \": \ "YOUR_MESSAGE \"}} "," ADM ":" {\ "data \": {\ "message \": \ "YOUR_MESSAGE \"}}} }}, 'Messaging Da '= & gt;' jason '));  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -