Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
nicklas
Posts: 150
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
Accepted Solution

Notification in beta3

Hi,

 

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 ?

 

Nicolas

 

Developer
nicklas
Posts: 150
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha

Re: Notification in beta3

For 4°/ it's OK ; I haven't seen ; but it's a feature linked to Tab object :smileyhappy:

 

Remains points 1 to 3.

 

Nicolas

 

Developer
nicklas
Posts: 150
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha

Re: Notification in beta3

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 ?

 

Nicolas

 

Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Notification in beta3

Hi Nocolas,

 

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:
http://hosting.desire2learncapture.com/RIM/1/watch/46.aspx

 

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.

 

Cheers,

Garett
@garettBeuk
--
Goodbye everybody!