Hello list,
I was thinking of writing a XEP for sending a sender ID (Google Cloud
Messaging) or a device token (Apple Push Notification Service) or any
other push notification service token (that is, a generic one) to the
server.
Almost all push notification services works the same way: the server
provides a provider ID to the client and the client provides a device
token to the server.

I was thinking of using service discovery to advertise the service
from a server:

<iq from='example.com' type='result' id='H-2' to='[email protected]'>
  <query xmlns='http://jabber.org/protocol/disco#items'
node='http://jabber.org/extensions/presence#push'>
    <item node='SENDER-ID' jid='gcm.push.example.com' name='Google
Cloud Messaging'/>
    <item node='PROVIDER-ID' jid='apns.push.example.com' name='Apple
Push Notification Service'/>
    <item ... />
 </query>
</iq>

In the "node" attribute I'd put the provider ID I was talking about earlier.

Device token could be sent using a presence update from the client:

<presence>
  <status>...</status>
  ...
  <c xmlns='http://jabber.org/extensions/presence#push
provider='gcm.push.example.com'>REGISTRATION-ID</c>
</presence>

(that would need to be filtered by the server before broadcasting the
presence update though, for security reasons).

Or an iq to the push notification address could be used:

<iq to='gcm.push.example.com'>
  <token xmlns='http://jabber.org/extensions/presence#push'>DEVICE-TOKEN</token>
</iq>

I'd really appreciate some feedback. I think it would be a useful XEP.
Regards,
-- 
Daniele

Reply via email to