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

Posts: 193
Registered: ‎02-27-2009
My Device: Not Specified

Notification consequences interfere with each other

I've been experimenting with the notifications demo and custom consequences to customize LED notifications. The behavior I've seen on my BB Curve 8230 with OS 4.5 so far puzzles me. I've done the standard setup:

NotificationsManager.registerSource(NOTIFY_ID, ...)
NotificationsManager.registerConsequence(C_ID, ...)

The custom Consequence sets the LED to blink purple in startNotification:

LED.setColorConfiguration(500, 1000, 0x00990099);

I use the standard calls to start/stop the notifications:

NotificationsManager.triggerImmediateEvent(NOTIFY_ID, ...)
NotificationsManager.cancelImmediateEvent(NOTIFY_ID, ...)

When I trigger the event on my phone, the results can be inconsistent. I might see the LED blink purple briefly, then switch to red. Or it might stay purple. Calling cancelImmediateEvent turns off the purple or red light but may or may not restore the green coverage indicator. It seems to me that any custom Consequence clashes with the default consequence that is configured in Profiles, with the result that it is is either cancelled out or it shuts off the coverage indicator light.

  1. What's the point of being able to write a custom Consequence
    implementation if it will likely conflict with the default
    consequence implementation?
  2. What is restoring the green coverage indicator, and how may I do so
    from within a custom Consequence implementation?
  3. Should I forget about immediate events and use deferred events?
BlackBerry Development Advisor
Posts: 15,723
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Notification consequences interfere with each other

Modifying the blink pattern using the LED class basically overrides any current LED settings.  Since you are integrating with the profiles the appropriate way to handle this is to let the user enable/disable the LED blinking within their profile setting.  The "Repeat Notifications" option in the profile setting toggles the blinking of the LED for a notification.


There is no API to return the LED to its previous blinking state after it was changed using the LED class.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker