I am trying to send push notification to my windows devices using Remote API using C#. While using following code, I get the notification but it just says notification received only. But I require some informative message

string[] strArray = new string[] { "//deviceid" };
        int[] array = new int[] { 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12 };
        JObject json = new JObject(
            new JProperty("application", pwApplication),
            new JProperty("auth", pwAuth),
            new JProperty("notifications",
                new JArray(
                    new JObject(
                        new JProperty("send_date", "now"),
                         //new JProperty("content", "test"),
                        new JProperty("content", new JObject(
                                new JProperty("en", "test from api"))),
                        new JProperty("wns_content", new JObject(
                                new JProperty("en", message))),// message is base64 conversion of my message
                        //new JProperty("wp_type", "Toast"),
                        new JProperty("wns_type", "Toast"),
            //new JProperty("wp_count", 3),
                        new JProperty("data",
                            new JObject(
                                new JProperty("custom", "json data"))
                        //new JProperty("preset", "8EF14-E427D"),
                        new JProperty("platforms", array)
                                //new JProperty("devices", strArray)

        PWCall("createMessage", json);

I want to send toast message like:

Test(1): Title
Test(2): My Message

But I am not able to able to get the result. Can somebody help me this this?

asked 04 Apr '16, 11:29
amarchandr's gravatar image


edited 04 Apr '16, 11:30

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Apr '16, 11:29

question was seen: 491 times

last updated: 04 Apr '16, 11:30