Registering the Android Client

Register and enable your Android device clients to receive push notifications.

Prerequisites
Task
  1. If AndroidGcmPushEnabled is enabled, sender ID is sent in the response. On successful onboarding of client, the response indicates the GCM push is enabled.
  2. If GCM is enabled and the sender ID is available, client uses that sender ID to register itself with GCM and get its unique GCM registration ID.
  3. Use the PUT method in the URL, along with the registration ID:
    http://<host:port>/odata/applications/{latest|v1/}{appid}/Connections/('{appcid}')
    Method : PUT
    HTTP Headers "Content-Type" = "application/atom+xml" and "X-HTTP-METHOD" = "MERGE"
    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:AndroidGcmRegistrationId>{GCM registration ID}</d:AndroidGcmRegistrationId>
        </m:properties>
      </content>
    </entry>