c# - WNS receive JSON data from AmazonSNS -


i want link question previous question can't receive notification amazonsns

that question working after enabling toast on .appxmanifest. notified when publish raw message type not json need. code provided there let me repost here

d("init amazonsimplenotificationserviceclient"); amazonsimplenotificationserviceclient sns = new amazonsimplenotificationserviceclient("secret", "secret", regionendpoint.euwest1);  d("get notification channel uri"); string channel = string.empty; var channeloperation = await pushnotificationchannelmanager.createpushnotificationchannelforapplicationasync(); channeloperation.pushnotificationreceived += channeloperation_pushnotificationreceived;  d("creating platform endpoint request"); createplatformendpointrequest epreq = new createplatformendpointrequest(); epreq.platformapplicationarn = "arn:aws:sns:eu-west-1:x413xxxx310x:app/wns/device"; d("token: " + channeloperation.uri.tostring()); epreq.token = channeloperation.uri.tostring();  d("creat plateform endpoint"); createplatformendpointresponse epres = await sns.createplatformendpointasync(epreq);  d("endpoint arn: " + epres.endpointarn);  d("subscribe topic"); subscriberesponse subsresp = await sns.subscribeasync(new subscriberequest() {     topicarn = "arn:aws:sns:eu-west-1:x413xxxx310x:topic",     protocol = "application",     endpoint = epres.endpointarn });  private void channeloperation_pushnotificationreceived(windows.networking.pushnotifications.pushnotificationchannel sender, windows.networking.pushnotifications.pushnotificationreceivedeventargs args) {     debug.writeline("receiving something"); } 

i notified when publish raw message need notified when publish in json message type. not sure why don't notified when use message type? else missing there?

thanks


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -