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

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?
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!