• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while using 'BACK' key in Android's App.

 
Bilal Asif
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The emulator close my application each time i press BACK key in emulator.
It is happening in menu navigation.
Can any1 please help..??
 
Charles Joseph
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the call back method onStop in Activity

if you provide like this



Then your application may exit
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the menu is currently drawn/displaying on the screen and you press BACK button, the menu would be taken off the screen but your activity will still be displayed. There could be a problem with the way your menu has been set up.

Generally, pressing the BACK button will take you one step back in the Activity call stack. So, if you pressed BACK when you were on the first screen of your application your activty will be stopped and sent in background.

@Charles
I dont think, the onStop callback is invoked when the user is navigating through the menus and then presses BACK button.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic