Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to close an android application

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.

i want to quit from my android application when i press back of my mainactivity...
i have tried using finish();

but still no result...
when i start my app it opens some activity in stack and from splash screen

looking for suggestions

 
Przemek Boryka
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

Try with this :



This part of code, will start "MainActivity" and set it on the first place on the stack. I used this code in boot up receiver to automatic launch app.

Bye, I hope this will help you
 
Przemek Boryka
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again !

You can try to use:



But this is strongly not recommended

Bye!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic