0 Replies Latest reply on Feb 28, 2012 5:15 PM by Justin_19

    Is it possible creating a native extension that over rides the default home functionality?

    Justin_19 Level 1

      I trying to make a android application that runs like a kiosk app. You will not be able to exit out of this app with out typing in a password or shutting down the tablet. The problem is there doesn't seem to be a way to stop the home button from firing It doesn't lanch the KeyboardEvent.KEY_DOWN or the KeyboardEvent.KEY_UP event.

      My code is


      import mx.events.FlexEvent;


                     // Add the hardware key event handlers to the stage.

                     protected function appCompleteHandler(event:FlexEvent):void {

                          stage.addEventListener(KeyboardEvent.KEY_DOWN, handleButtons,false, 1);

                          stage.addEventListener(KeyboardEvent.KEY_UP, handleButtons,false, 1);



                     // Event handler to handle hardware keyboard keys.

                     protected function handleButtons(event:KeyboardEvent):void


                          trace("Event fired");

                          if (event.keyCode == Keyboard.HOME) {



                          } else if (event.keyCode == Keyboard.BACK) {

                               // Hanlde back button.






      The trace("Event fired"); isn't even showing up when the home key is being hit. (this is on a eee transformer prime tablet) This code does work in the simulator.


      This is all in a flex mobile application running flex 4.6.0 and I'm using flash builder 4.6.


      If you read this article it says can no long able to over ride the home button which you where able to do before. (look for the section titled The Home soft Key.)



      What I'm wandering is it possible to create a native extension that overrides the home button since it does seem like you are able to over ride the functionality in java mobile applications?