Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Notifications API: Setting up support for Notifications UI

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Qt Notification API deprecated.

Article Metadata
Created: isalento (21 Apr 2011)
Last edited: hamishwillee (21 Nov 2013)

This article demonstrates how to set up support for using the Notifications UI in your Qt application.


The Notifications API lets you add real-time push notifications to your client applications running on Nokia devices. It includes a Service API, which provides access to the Nokia Notification Server through an HTTP REST interface, as well as a Client API, which allows applications on the device to register and receive notifications from the Nokia Notification Server. The Client API is available for Qt on Symbian and MeeGo devices.

Notifications API has a separate Notifications UI application that applications can use a launcher. To use it you must enable it in your application.

iNotificationInterface->setNotificationUi(true, iIconData);

setNotificationUi(true, icondata) requires to have the icon data encoded in Base64 format. Converting the icon data into Base64 string can be done easily as described in the following code snippet.

QImage image;
//load image from resource file
QByteArray imageData;
QBuffer buffer(&imageData);
//Write qimage to buffer in PNG foramt, "PNG");
QString iconData = QString::fromLatin1(imageData.toBase64().data());
setNotificationUi(true, iconData);

Notifications UI video

The following video shows how you can use the Notifications UI in your applications.

The media player is loading...

This page was last modified on 21 November 2013, at 09:52.
322 page views in the last 30 days.