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: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Make LED only blink 15 Minutes

[ Edited ]

Hi,

 

I want my LED only to blink for 15 minutes after I set it to blink - just like a new eMail.

 

But there is no overloaded method

 

LED.setState(LED.STATE_BLINKING)

 

with which I could establish this.

 

How is this done?

 

I think a timer is not possible because my application is not running all the time.

 

 

Best regards,

 

Bullety

Highlighted
Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Make LED only blink 15 Minutes

Unless your application is running to turn it off, I don't think there is a way using this approach.

 

However you might like to look at the Notifications API as a way of doing this - then the user gets to control the notification they receive. 

Developer
Posts: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Re: Make LED only blink 15 Minutes

Hmm, I checked the notifications but I don't think there is an option to get this working like I want it.

 

I wonder if there is a global timer I can run (even if my application is off) which will execute such commands.

 

The other possibility I thought would be creating a new message (which will possibly enable the 15 minute LED by itself) but this is not what I want.

 

How do other applications limit their LED blink time?

 

 

Best regards,

 

Bullety

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

Re: Make LED only blink 15 Minutes

As the other guy said, you should look into the notifications API. BlackBerry LED notifications time out after a maximum of 15 min. All you have to do is issue a notification. Unless the user disabled LED repeat notification for your app, the LED will blink for at most 15 min after which the phone will automatically end that blinking. Try it and see.

Developer
Posts: 142
Registered: ‎08-02-2009
My Device: Z10
My Carrier: T-Mobile

Re: Make LED only blink 15 Minutes

Thank you.

 

I checked the notifications api but it did not help because I won't get it run.

 

I also checked this thread:

http://supportforums.blackberry.com/t5/Java-Development/Notification-Profiles-API/m-p/134302/highlig...

 

and tried the notification sample application but nothing happens if I use

NotificationsManager.registerSource

 I do not get such a profile item for my application when using this.

 

Also, the sample application won't get this in the simulator.

 

Am I doing something wrong or isn't this working in the simulator at all?

 

I checked it on a real device, too and it was also not working.

 

 

Best regards,

 

Bullety