I have some troubles with spash screen. When I launch app, splash screen activity launches for some seconds. After it main activity launches.
And if i press home button on the main activity and then relaunch app from apps list, splash activity launches again although the app is already in backstack. But I expect main activity to restore from memory.
And if i press back button after that android returns me to the previous copy of main activity.
What I have to do to make splash screen appear just once? And how to get my app relaunched from the last screen I saw before the home button was clicked?
<activity
android:name=".ui.SplashActivity"
android:noHistory="true"
android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".ui.MainActivity"/>