Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimize and click on app icon, app should not starts from splash

Tags:

android

Step 1: Click on app icon opens up a Splash Screen then comes a Login Screen which has edit text fields.

Step 2: Minimize the app, go to home screen and then click on the app icon.

Expected Result: It should start from where I left.

Actual Result: It is starting from the Splash screen.

Here is Manifest code snippet:

 <application
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:roundIcon="@drawable/app_icon"
    android:supportsRtl="true"
    android:theme="@style/AppThemeMain">

splash:

 <activity
        android:name=".SplashActivity"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@style/AppThemeMain">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
like image 338
Asif Sb Avatar asked Oct 24 '25 03:10

Asif Sb


1 Answers

Finally, I solved it by removing android:launchMode="singleTask" from our manifest.

like image 156
Asif Sb Avatar answered Oct 26 '25 16:10

Asif Sb