Setting up push notifications for Windows Phone Silverlight 8
You can set up a web service to provide authenticated or unauthenticated push notification on Windows Phone Silverlight 8.
Before you begin
You must also authenticate your web service with Microsoft, as documented in the Windows Phone Development Center at http://dev.windowsphone.com/en-us/develop/.
About this task
For unauthenticated push, no specific setup is required, as shown in the example at the end of this procedure.
Practically, consider authenticated push notification for production, to protect your data, and non-authenticated push at development time only.
Procedure
Attribute | Setting |
---|---|
serviceName | The common name (CN) found in the MPNS certificate's Subject value. |
keyAlias | The alias that is used to access the keystore that the following
properties specify in the worklight.properties file:
|
keyAliasPassword | The password for your key alias. |
Results
In response to push notification requests, MPNS returns a response code and a status. If the request is successful, the response code is 200, and the status is Received. For details of other response codes, go to the MSDN website at msdn.microsoft.com, and search for "push notification service response codes".
Example
- For authenticated push notification:
<windowsPhone8> <pushSender> <authenticatedPush serviceName="myservice" keyAlias="janedoe" keyAliasPassword="a1b2c3d4"></authenticatedPush> </pushSender> ... </windowsPhone8>
- For unauthenticated push
notification:
<windowsPhone8> <pushSender/> ... </windowsPhone8>