skip to Main Content

Is it possible to open straight to last activity in app when previously pressed the back button ?
just like when pressed home button the app will straight to open last activity.

using finish() and finishAffinity() not working because it will close the activity

2

Answers


  1. If you finish the previous activity . There is no way you could go back there.

    Start the new activity without finishing the previous one. Finish should work

    Login or Signup to reply.
  2. You can use SharedPreferences to save the last Activity and run when you want. you can save your parameter too

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search