Quantcast
Channel: Adobe Community : Unanswered Discussions - AIR Development
Viewing all articles
Browse latest Browse all 2010

System 'Back' button in Android 4.3

$
0
0

My Nexus 4 was recently updated to Android 4.3. The below code to control the system Back button worked with the previous versions of Android 4.2 and below. However, now my phone has been updated to 4.3, the Back button simply closes the app. The Back button works perfectly in the Simulator. Here is the code:

 

 

stage.addEventListener(KeyboardEvent.KEY_UP, backButton);

 

private function backButton(e:KeyboardEvent):void

{

 

                              if (e.keyCode == Keyboard.BACK) {

                                             e.preventDefault();

                                             e.stopImmediatePropagation();

                                             clickClose(null); //Brings up a splash screen to confirm whether to close the app

     }

}

 

 

Has anyone else had this problem or is there a solution to get it to work?

 

 

Thanks,

 

hp


Viewing all articles
Browse latest Browse all 2010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>