BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   Background application that listens on keypad. (http://www.blackberryforums.com/showthread.php?t=263592)

abhsax1978@hotmail.com 02-25-2013 05:44 AM

Background application that listens on keypad.
 
Hello everyone,
I am trying to create an application targetting 5.0 devices, that will enable the backlight when a sequence of characters are typed on nowhere, but keypad.

Any gueses how to implement a listener in an application like that?

Thanks in advance.

Dougsg38p 02-25-2013 03:59 PM

Re: Background application that listens on keypad.
 
Only the application that owns the currently focused UI component gets the keystrokes.

There is no global keystroke listener for the Java API's.

abhsax1978@hotmail.com 03-02-2013 12:13 AM

Re: Background application that listens on keypad.
 
Ok, it could be convenience key that is manually set by user as a shortcut to my application..
Or event thrown by accelerometer from a background service, which could activate my application..
Let me see this can happen.

abhsax1978@hotmail.com 03-02-2013 12:13 AM

Re: Background application that listens on keypad.
 
Accelerator is happening, but you have to shake hard!!. Otherwise I would need my application to be notified (it runs on autostart, so it is already running) when the hot (convenience) key is pressed.

I think of using another (secondary) application that notifies the main (backlight) application (and that secondary application starts on hotkey, notifies and closes), back light is switched on in an event. Then again this hot key is pressed, the main application is notified, to turn it off, and the secondary application closes.

There could be a direct way of doing it. I mean: do I need this secondary application?

abhsax1978@hotmail.com 03-12-2013 05:44 AM

Re: Background application that listens on keypad.
 
I have done the application and it is fabulous as stated above. Thanks.


All times are GMT -5. The time now is 01:57 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.