vendredi 25 septembre 2015

Sending raw WNS notifications using message attributes

I am attempting to send a raw notification to WNS by setting message attributes, but it appears that a toast notification is being sent instead.

Here is the C# code I'm using to build the publish request.

var request = new PublishRequest()
{
    TopicArn = TOPIC_ARN,
    Message = "Test Message",
    MessageAttributes = new Dictionary<string, MessageAttributeValue>()
    {
        { "AWS.SNS.MOBILE.WNS.Type", new MessageAttributeValue() { StringValue = "wns/raw", DataType = "String" } }
    }
};

From what I can tell, I am setting the X-WNS-Type correctly using SNS Message Attributes, but the notification is still received as a toast on the client. Are there any examples of somebody doing this successfully?

Aucun commentaire:

Enregistrer un commentaire