I don't want my application to show few Activity (say SplashScreenActivity) when pressing back button. So I've used noHistory=true in my Manifest.xml for that Activity as show below:
<activity
android:name="com.gokul.SplashScreenActivity"
android:noHistory="true" >
</activity>
Instead of setting noHistory, I can also call finish() in my SplashActivity.onPause() method or wherever I want, as shown below:
@Override
protected void onPause() {
super.onPause();
finish();
}
Both does the job perfectly. But which one is better to use, to use noHistory or call finish()?