The Nokia Notifications Client API allows MIDlets to receive notification state changes, notification information and notification messages.
MIDlets can use the Nokia Notifications Client API to:
receive information about notification state changes
receive notification information
receive notification messages
There are some general requirements for your MIDlet that you need to know.
Getting end-user permission for application-specific Nokia push notifications
Your MIDlet shall ask the end-user whether he or she wants to receive Nokia push notifications for your MIDlet or not. You may do this for example, by providing an application setting value for this with relevant information. You may also implement a dialog that is launched within the first launch of the MIDlet; the end-user is provided with a selection whether to take the Nokia push notifications into use or not. A reference implementation logic for handling the end-user permission value:
First launch of your MIDlet:
Show a query to the end-user to ask for his/her permission for subscription of the application-specific Nokia push notifications. The text shown is up to your implementation; for example, the text could be something like this: "Do you want to receive service X related push notifications?"
If the end-user allows the Nokia push notifications then the MIDlet shall call NotificationSessionFactory.NotificationSession.openSession and NotificationSession.registerApplication etc as instructed elsewhere about the registration. The MIDlet should store somehow the permission to be able to check it during later launches to know if the Nokia push notifications are used or not. In addition the permission value can be shown on the application-specific settings where the end-user can change the value.
Second or later launch of the MIDlet:
MIDlet should check from the application settings whether the end-user has allowed the application-specific Nokia push notifications or not.
If the end-user has according to the stored setting value allowed the push notifications then your MIDlet should do the Nokia Notifications API related registration for push notifications subscription.
Managing the Notification ID value
If your service sends only Publish (broadcast) method kind of messages then you do not need to implement logic for handling the Notification ID (NID). In case your service needs to send notifications for one or more users but not all at once then your MIDlet needs to request NID and tell it to your service. Service uses the NID to address your notifications targeted for you (to the MIDlet running on your device). Remember that the NID is device+application specific value. This means that if your service requires user authentication then the NID value should be always switched over to point to the current user profile in your service.
Last updated 9 October 2013
We appreciate your feedback.