09-30-2012 10:26 AM
I have several questions about Notification :
1°/ In sample :
Notification* pNotification = new Notification(); pNotification->setTitle("My Notification"); pNotification->setBody("This is important information."); pNotification->notify();
Do I have to delete the object created after ?
2°/ To clear events, I need only to do this :
Notification* pNotification = new Notification(); pNotification->clearEffectsForAll();
does the clearEffectsForAll function do the "delete" ?
3°/ Where can I see the notification details (title and body) on the dev alpha ?
4°/ How to add the star on a icon in my menu ? as in BlackBerry Messenger ?
Solved! Go to Solution.
10-01-2012 03:51 PM
I add a new point :
5°/ I create some notifications ; then the user close the application. When the user re-starts the app ; the notifications exist always. How can I retrieve them ?
10-04-2012 07:32 AM
1) Notification inherits from QObject, so it will get deleted with its parent. If you no longer need to use the object you can always call Notification::deleteLater() which will delete it the next time the system has a chance.
2) No, this merely clears all effects of a Notification (LED blinking, splat on appllication tile etc)
3) At this time, you cannot. These would show as an item in the BlackBerry Hub (Unified Inbox) but this is not available in the Dev Alpha OS builds. You can take a look at the following presentation from BLackBerry Jam last week for more info:
5) You don't need to know which notifications are active, you can know what information is new in your application though and clear the notifications once the user has viewed all new data.