BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   Backlight and key listener (http://www.blackberryforums.com/developer-forum/197750-backlight-key-listener.html)

egirotto 07-19-2009 06:32 PM

Backlight and key listener
 
Hi,

in my application i need to control every key pressed.

Everything is ok until the blackberry change the backlight state.
If the backlight is off and i press a key, my application can't intercept it (is the end key)

Any suggestion?

Thank

hrbuckley 07-19-2009 09:26 PM

Your application will only be able to get key strokes when in the foreground. When the backlight is turned off the OS takes the foreground so the first keystroke can turn the light back on.

egirotto 07-20-2009 06:48 AM

thanks for answer!

yes, is it. But the problem is that the first key that i press when the bb is "obscured" is not consumed and bb use it.

I have my application in the top of stack when the "light turn off" and if i press the END char to "turn on the light", the system close the screen (as it must do if i don't intercept the event).
Is the only key that do it, the others doesn't do nothing (i think becouse i can intercept them)...

p.d. sorry for spanglish

hrbuckley 07-20-2009 07:39 AM

You may find under certain circumstances that other keys do not get intercepted. The Start key for example when the phone is ringing.

egirotto 07-20-2009 08:49 AM

:?

this means that there aren't any solution?

The event must be generate and a listener must be listen for it...

Any idea?

Thank!!!

hrbuckley 07-20-2009 10:21 AM

Re-examine the use you want to make of the buttons. Why do you want to remap the End Key function?

egirotto 07-21-2009 02:09 AM

In the application i have different user level.
One of them is a low privilege user, that can only use this.

To do this, i need that the application stay foreground ever (i know that is a little bit forced, but is the requirement :oops:).

So, I need to control every key, and this is the only moment that i lost it.

And i think that is not so good that if I have an open application, when i can't see the content of display and I press a key, it disappear...

p.d. thank for help

hrbuckley 07-21-2009 07:57 AM

Quote:

Originally Posted by egirotto (Post 1433529)
In the application i have different user level.
One of them is a low privilege user, that can only use this.

To do this, i need that the application stay foreground ever (i know that is a little bit forced, but is the requirement :oops:).

Blackberry OS does not have support for multiple users. Even if you could solve this problem (which I doubt), the security would be dubious at best.

However if you are required to go down this road, you could keep the device on, at the expense of increase battery usage. Read this article.

egirotto 07-21-2009 12:49 PM

Quote:

Blackberry OS does not have support for multiple users. Even if you could solve this problem (which I doubt), the security would be dubious at best.
is different thing, the multiple user is for application.
The bb is a work device and there are many people that use the same.
One is administrator of application, others are simple users.
When the application start ask for user and psw (of itself) and only if is an administrator, he can esc.

The problem of battery is a big problem, so i think that i need another solution.

Thank for help hrbuckley!


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

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.