I have:
- Written a running Android App that recieved FCM notification.
- Setup Amazon SNS: Mobile:Push notifications.
- I am able to publish message using Amazon SNS Console through "Custom payload for each delivery protocol".
{ "GCM": "{ "data": { "MyTitle": "Sample endpoints", "MyMessage": "Important" } }" }
Amazon SNS Console - Publish Message
- My running Android App is able to recieve the message with "data" only. This is what I expected to recieve.
"{MyTitle=Sample endpoints, MyMessage=Important}"
Android Studio - Message received
- Wrote a .NET application using "AmazonSimpleNotificationServiceClient" [AWSSDK.SimpleNotificationService 3.7.4.3] to publish request, trying to do the exact same way to publish message like Amazon SNS Console. I am able to published successfully.
Visual studio .NET Application
- My running Android App recieved the message but the message is wrapped within the "default" attribute. This is not expected, I want the same message I recieved from the Amazon SNS Console.
{default={"GCM": "{ "data": {"MyTitle": "Sample endpoints", "MyMessgae" : "Criticald" } } " }}
Android Studio - Message received
- I tried to utilize PublishRequest.MessageSturcture to "json" (this requires "default" attribute before it can be published). I removed that, the message automatically wrapped with "default".
- How do I send custom raw message from .NET Application the same way I can send "Custom Payload for each delivery protocol" from Amazon SNS Console? I want to publish to the "platform endpoint ARN".