This document describes the functionality of a client SDK that works with the AeroGear UnifiedPush Server.
The AeroGear UnifiedPush Server is accessible via HTTP. Instead of having to manually register a device (Installation
) with the HTTP interface, a client library should be offered.
Goal: A client library to register a mobile application (Installation
) with the UnifiedPush Server.
To receive native push notifications from a Push Network (e.g. APNs, GCM or SimplePush), the mobile device is identified with a unique device-token
, assigned by the actual Push Network. This device-token
is passed, by the underlying Operating-System, to the mobile application. Details are different on each platform and not part of this document.
The device-token
needs to be registered with the AeroGear UnifiedPush Server, to indicate there is a new Installation
for a Variant
.
WARNING: The focus of this specification is to describe the generic minimum and not any platform-specific requirements
The client SDK offers the following features:
Installation
Installation
(optional, due to platform specific restrictions)Everytime when a mobile application launches it receives the above mentioned device-token
, via a platform-specific method (or callback). Since the Push Network (e.g. APNs or GCM) may assign a new token to a device, it is recommended to always (re)register the device-token
with the AeroGear UnifiedPush Server.
The required metadata for an Installation
:
The AeroGear UnifiedPush Server is able to store some user-specific metadata as well:
email address
or a username
.Internally, the client SDK needs to check if the device can establish a connection to the internet (PushNetwork and UnifiedPush Server). It should make use of the platform-specific APIs to check the reachability of the services.
Optional method that helps to unregister the client device information with the Unified Push Server.
Note: The method is optional, since not all supported Push Networks recommend having a client application actively performing an unregister. Apple for instance has a Feedback Service
, which the AeroGear Unified Push Server needs to frequently query for inactive tokens. Tokens, with Apple, are inactive when the user:
Internally, the client SDK needs to check if the device can establish a connection to the internet (PushNetwork and UnifiedPush Server). It should make use of the platform-specific APIs to check the reachability of the services.
Every client platform has its own base APIs, to receive Push Message from its Push Network. The AeroGear client SDK may offer utilities to simplify this process even more.
For example: In Android a custom Intent
is required, therefore it would make sense if the “AeroGear Android Push Client Library” offers a convenience implementation for this class.