+

Search Tips   |   Advanced Search

Event source-based notifications

Before a device can start receiving push notifications, it must first subscribe to a push notification event source. When the user approves the push notification subscription, the device is registered with an appropriate push server.

There are two levels of subscription: user subscription and device subscription.

User subscription for an event source is created when the user first subscribes to the event source from any device. The event source is declared in the MobileFirst adapter used by the application for push notification services.

After the user approves a push notification subscription, the device is registered with an Apple, Google, or Microsoft push server to obtain a token used to identify the device. The token is in the following form: Allow notifications for application X on device Y. The device then sends a subscription request to the MobileFirst Server.

  1. When the application first connects to the MobileFirst Server from the device, the device registers with a push service mediator and obtains a device token. This process is done automatically by MPF.

  2. When the token is obtained, the WL.Client.Push.onReadyToSubscribe callback function defined in the application is notified that a device is ready to subscribe to push notifications.

  3. After the WL.Client.Push.onReadyToSubscribe callback is notified, the application subscribes to a tag using the WL.Client.Push.subscribe API.

  4. Optional: If push notifications are no longer required, we can unsubscribe. The device subscription is deleted either by an application that calls the WL.Client.Push.unsubscribe API, or when the push mediator informs the MobileFirst Server that the device is permanently inaccessible.


Results

While the user subscription exists, the MobileFirst Server can produce push notifications for the subscribed user. These notifications can be delivered by the adapter code to all or some of the devices that the user subscribed from.


Parent topic: Push notification