I have problems with spam screens. When I launch the application, the splash screen activity starts in a few seconds. After the launch of the main event.
And if I click the Home button in the main action, and then restart the application from the list of applications, the burst activity starts again, although the application is already in the back. But I expect that the main activity will be restored from memory.
And if I press the "Back" button after the android returns me to the previous copy of the main action.
What do I need to do so that the screen saver appears only once? And how to make my application resume from the last screen that I saw before pressing the home button?
<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"/>
source share