Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Windows (WNS)

Each push notification includes a payload. The payload contains information about how the system should alert the user, as well as any custom data you provide.

Push IO allows you to send data to your app using JSON key pairs. These pairs are contained within the payload parameter in your POST command (see the Server API topic for details on sending via RESTful API).

NOTE: The maximum payload size for a WNS notification is 5kb. Windows Notification Services refuses any notification that exceeds this limit. Push IO also reserves a portion of this payload for engagement tracking and other mandatory metrics. Furthermore, each platform supports slightly different sets of features. For instance, Android does not have a badge parameter, while iOS does.

The WNS service lets you push 4 different types of notifications:

  1. Toast
  2. Tile
  3. Badge
  4. Raw

Microsoft documentation and template catalogs can be found here:

  1. Tile Catalog
  2. Toast Catalog
  3. Toast Audio Catalog
  4. Badge Scheme
  5. Headers Overview

The list of possible configurations for Toasts, Tiles, and Badges is quite large for WNS, so only a couple of API examples will be highlighted on this page.


NOTE: WNS specific payload sections let you include all parameters Microsoft recognizes (either in the XML body or in the HTTP header).

Example WNS Payloads:

{
    "message": "Hello World",
    "extra": {
        "alpha": "bravo",
        "charlie": [
            "delta",
            "echo",
            "foxtrot"
        ],
        "golf": 1,
        "hotel": true
    }
}


{
    "message": "HelloWorld",
    "payload_wns": {
        "tile": {
            "visual": {
                "binding": {
                    "template": "TileSquareImage",
                    "image": {
                        "src": "https://i-msdn.sec.s-msft.com/dynimg/IC718847.png",
                        "alt": "AltText"
                    }
                }
            }
        },
        "badge": 1,
        "raw": {
            "data": {
                "alpha": "bravo",
                "charlie": [
                    "delta",
                    "echo",
                    1,
                    2,
                    3
                ]
            }
        }
    }
}

API for OnLaunched Events:

You can pass a launch attribute by putting it into the payload as a child of the toast element:

{
  "payload_wns": {
    "toast": {
      "visual": {
        "binding": {
          "template": "ToastText01",
          "text": "Hey There"
        }
      },
      "launch": "LAUNCH_STRING"
    }
  }
}