i attempting send raw notification wns setting message attributes, appears toast notification being sent instead.
here c# code i'm using build 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 can tell, setting x-wns-type correctly using sns message attributes, notification still received toast on client. there examples of doing successfully?
i able working using messagestructure
. setting value json
, updating message
have message wns did trick. assumption wns value messageattributes
applies if message defined wns.
var request = new publishrequest() { topicarn = topic_arn, message = "{ \"default\": \"default message\", \"wns\" : \"raw message\"}", messageattributes = new dictionary<string, messageattributevalue>() { { "aws.sns.mobile.wns.type", new messageattributevalue() { stringvalue = "wns/raw", datatype = "string" } } }, messagestructure = "json", };
Comments
Post a Comment