09-29-2009 05:14 AM
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
09-29-2009 06:13 AM
"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.