Registering the MPNS Client

Register and enable your Windows phone 8 to receive push notifications.

Prerequisites
Task
  1. To obtain the channel URI, register the application with MPNS. See Push notifications for Windows Phone on the Windows Phone Dev center Web site.
  2. Check the MpnsPushEnable value returned from the registration, and continue with the rest of the MPNS or notification registration processing only if the value is true. Set the MpnsChannelURI value received from the application.
  3. Using the ApplicationConnection ID ({appcid}) returned from the SAP Mobile Platform registration call (in either the X-SMP-APPCID HTTP header or the ApplicationConnectionId property), the application should update the MpnsChannelURI property for the application connection for your application by using the Channel URI returned by the application:
    https://host:port/odata/applications/{latest|v1/}{appid}/Connections/('{appcid}')
    Method : PUT
    HTTP Headers "Content-Type" = "application/atom+xml" and "X-HTTP-METHOD" = "PUT"
    Body:
    <entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
      <content type="application/xml">
        <m:properties>
                        <d:MpnsChannelURI>{MPNS Channel URI}</d:MpnsChannelURI>
        </m:properties>
      </content>
    </entry>