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
ubuntaur
Posts: 41
Registered: ‎09-11-2009
My Device: Not Specified

Detecting 3 or more keys held down at once

I'm writing an application for law enforcement officers and one of my requirements is to send a special emergency message to a server whenever 3 or more keys are held down for a certain number of seconds. This is used in a situation where an officer is injured and is unable to call for backup so he just holds down as many buttons as he can on the keyboard (this feature is available on some of our pre-existing Windows based software).

 

In short: How do I detect if more than 3 keys are held down for more than, say, 5 seconds? It doesn't really matter which keys.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Detecting 3 or more keys held down at once

I assume the BlackBerrys in question have a password lock enabled by IT Policy (would be strange if they did not). In this case, I suspect you are doomed as the officers would have to unlock the BlackBerrys first before any kinds of keypad press events can even in principle reach any kind of third-party application. You may want to check whether your app can get mute/unmute or volume key presses despite the password lock.

Developer
ubuntaur
Posts: 41
Registered: ‎09-11-2009
My Device: Not Specified

Re: Detecting 3 or more keys held down at once

Actually our customers who are requesting this application plan on running it on personal phones, not company owned equipment. Some departments may, but from what my superiors have told me it will be installed on personal devices.

 

Even if a password lock must be disabled they still want me to implement it since our other products have it.