-1

My app main launcher is the LoginActivity which, in most of the cases, at the end start MainActivity from where all actions in my app can be launched

This is the "normal" scenario

however, when someone lauches the app from share context, or notification the LoginActivity redirects him straight to the activity responsible for handling that specific scenario...

this way when the user presses "back" on cellphone the activity stack goes back to login, instead of main

How can i tell login activity to put two activities on stack in order to create this "fake" back history

Rafael Lima
  • 3,079
  • 3
  • 41
  • 105

1 Answers1

0

Take a look at https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder . It will help you create the back stack you are looking for.

shubhamgarg1
  • 1,619
  • 1
  • 15
  • 20