View Single Post
Old 05-15-2008, 07:56 PM   #1
skynetchris
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: optus
Posts: 24
Default catch red/hangup button

Please Login to Remove!

Hi guys,

I have a program that should always popup a password screen when it starts up. The problem is that pressing the red hangup button simply puts the program into background, so the next person who opens it WONT be prompted for the password.

I'm trying to catch the KEY_END event and close the application (as per this thread).

Using this method:

Code:
class Password extends PopupScreen implements
   KeyListener, TrackwheelListener {
...
  public boolean keyDown (int keycode, int time){
       switch (keycode)
       {
            case 1179648:
                close();
                break; 
       }
    return false;
    }
It does SEEM to be possible, as this user points out in a therad at the end.

I've tried both methods (KEY_END and 1179648) Neither closing the application.

Any ideas?
Offline   Reply With Quote