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: 49
Registered: ‎08-25-2009
My Device: Not Specified

Re: Using postGlobalEvent with OptionsProvider

Sorry, I misunderstood the globalEventListener, can you suggest how I can do that....

I want to turn LED off when user interact with phone i.e. any touch event in storm or any keyevent in any other device...., or any other event..

and let me know how to start an application from optionproviders methods...

 

Thanks 

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

Re: Using postGlobalEvent with OptionsProvider

"I want to turn LED off when user interact with phone i.e. any touch event in storm or any keyevent in any other device...., or any other event.."

 

GlobalEvent will not help you with this.  GlobalEvents are specific events that the OS or third party application believes other applications might be interested in hearing about.  A user pressing a key on the screen does not fall into that category - the only thing likely to be interested in that is the Screen itself. 

 

So you can forget about using GlobalEvent for this.

 

"let me know how to start an application from optionproviders methods..."

 

There is no need to do so in this case.

 

As a possible design for your application, create a background application that is autostarted by the device (i.e. always running).  Have it check

DeviceInfo.getIdleTime()

every now and again.  If this is small, then there has been some interaction and you can turn the LED off.