onPause()
is not at all a good place to put a finish()
call for your activity. onPause()
can be called for a variety of reasons, and I doubt your users would be very pleased to see that whatever they were doing was simply forgotten by your app if they, for instance, turn the screen off and back on.
noHistory
should serve you just fine, but you can get a similar behavior by calling finish()
in your Activity
immediately after it launches a new Activity
. However, noHistory
is more maintainable in the end, because you may end up forgetting to include the finish()
call if you add another startActivity()
call to your SplashActivity
later.