The Nokia Notifications API makes it easy to add real-time push notifications to your MIDlets running on Nokia Asha software platform devices. As shown in the diagram below, MIDlets access the Nokia-hosted Notification Server through two separate interfaces:
The Service API provides access to the Notification Server through an HTTP REST interface. Your service uses this interface to send notifications.
The Client API allows MIDlets on the device to register and receive notifications from the Notification Server. The Client API is available for Nokia Asha platform devices.
The diagram below shows the typical lifecycle of a notification.
Before a MIDlet can receive notifications, it must register with the Notification Server and request Notification ID. This Notification ID uniquely identifies both the end user and the target MIDlet and is used by the Notification Server to route notifications.
The MIDlet then shares this Notification ID with its respective service; the service now knows where to send the notification.
When a notification is ready to be sent, the service sends it to the Notification Server using the Service API, providing the notification data (also called payload) and the Notification ID.
To enable future delivery, that is Store and Forward functionality, in case user is offline (for example if temporarily out of coverage area), the service must use expires-at parameter.
The Notification Server sends the notification to the MIDlet:
Real-time, while user is online.
Once user gets online, if user was offline and Store and Forward functionality (using expires-at parameter) was used.
As described in the sequence above, a notification can be sent to a specific user, identified by the Notification ID. In a similar way, a notification can be sent in bulk to many users at once using the Notification IDs to identify the recipients.
In addition, there is a method called Publish that can be used to send notifications, which does not use Notification ID as a parameter. Instead, when using Publish, notifications are sent to all users of the service, who are online.
Last updated 9 October 2013