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

Java Development

Reply
Developer
Posts: 194
Registered: ‎12-14-2009
My Device: Not Specified
Accepted Solution

Notifications: Consequences Question

I have an app that registers itself with the BB's notifications system therefore showing up in profile. I also get it to trigger by simply calling triggerimmediateevent. Those two are easy. It seems that the LED will stay on though even after the user dismisses the notification. I suppose i have to do this whole registerer a Consequence, make a consequence object, and set the stopNotification method to have it turn the led off. Is that what has to be done? I have gone over the notification example app but can't figure it out. Seems like they make a new event every time and a new consequence object every time. And then all this sync and byte stuff. Looks overly complicated for my simple needs. Is there a simple way to have that one notification I use to call the stopNotification method once the notification is cancelled by the user?

Developer
Posts: 16,580
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Notifications: Consequences Question

I use static references to the notifications.
i use fire() to trigger one, and cancel() to cancel it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 194
Registered: ‎12-14-2009
My Device: Not Specified

Re: Notifications: Consequences Question

[ Edited ]

Thanks. I got it fixed last night too. All I had to do was somethign similar to you. Just make a long Event ID and when I wanted the notification to cancel fire cancelImmediateEvent  .