Reputation: 445
I have two activities:
A: a Splash Screen
B: the Main activity
When the application starts, I show the splash screen with a short video then call B. I want the user to be able to close application with the back button in activity B. (The user shouldn't see splash screen again.)
Upvotes: 0
Views: 1212
Reputation: 162
You can set android:noHistory="true" for the splash screen in the manifest. This will not add the activity to the back stack.
<activity
android:name="SplashScreen"
android:noHistory="true"
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Upvotes: 4