0

I have an issue where I want to differentiate between an activity being stopped because the user wants to navigate back (staying active within my app), or putting my app into the background (switching to the home screen or another app).

Is there any way to tell during onPause or onStop which of the two is the case?

Canoe
  • 589
  • 5
  • 8
  • http://stackoverflow.com/questions/5227071/understanding-of-isfinishing – Kevin Krumwiede Apr 08 '17 at 19:31
  • That's an interesting one. First of all, if you mean 'hitting the back button' when you say 'navigate back', then you can override onBackPressed in your activity. If you get onStop or onPause without it, then the user has initiated leaving the activity in another manner. This does not mean the user has put your app in the bg necessarily- it means the user has left the activity – Ginandi Apr 08 '17 at 19:33

0 Answers0