Android Developer Question: Download Android Developer PDF

Tell me two ways to clear the back stack of Activities when a new Activity is called using intent?

Tweet Share WhatsApp

Answer:

The first approach is to use a FLAG_ACTIVITY_CLEAR_TOP flag. The second way is by using FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK in conjunction.

Download Android Developer PDF Read All 56 Android Developer Questions
Previous QuestionNext Question
Tell us difference between Service, Intent Service, AsyncTask & Threads?Do you know launch modes in Android?