Try setting clearTaskOnLaunch on the launcher / home activity (which I assume is FirstActivity).
2011/6/20 Jey <[email protected]> > Hi Kostya, > > i tried with FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET but > still my second activity comes foreground , i have a service with two > activities > > > FirstActivity--> myService--> secondActivity > > > I finish() the secondActivity in backclick , > > when i using home button to launch my app , my second activity comes > foreground again i want to start my first activity > > > On Jun 20, 4:11 pm, Kostya Vasilyev <[email protected]> wrote: > > You can try clearTaskOnLaunch in the <activity> or finishTaskOnLaunch for > a > > particular activity. > > > > You can also try FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET. > > > > Home screen shortcuts are launched with FLAG_ACTIVITY_NEW_TASK | > > FLAG_ACTIVITY_RESET_TASK_AS_NEEDED, I'd recommend read up on them first. > > > > -- Kostya > > > > 2011/6/20 Jey <[email protected]> > > > > > > > > > > > > > > > > > I want to Remove top activity from display stack , > > > FLAG_ACTIVITY_CLEAR_TOP helps me to do this but not in all cases, this > > > flag helps when i Manually launch a particular activity and removes > > > top activity from stack ,But when i bring my application from Home > > > Screen , by default top activity only displayed How can i launch a > > > particular activity from Home ? > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > [email protected] > > > To unsubscribe from this group, send email to > > > [email protected] > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

