On Tue, Jan 19, 2010 at 3:00 PM, Viral Brahmbhatt <[email protected]> wrote: > Hello, > > Is there a way to directly move to home screen from application, without > pressing the home button on the phone. >
The activities in your application stack on top of each other, so you need to return an "exit" result back to each parent so they know to close. You can use startActivityForResult() and onActivityResult() for this. Take a look at Step 4 of the Notepad tutorial (http://developer.android.com/intl/fr/resources/tutorials/notepad/notepad-ex2.html) for more info on how these are used. If you return a flag called something like "EXIT_APP", you can keep passing the value back to each parent activity, and finally call "finish();" on the last one to exit back to the Home screen.
-- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

