I don't understant why is this happend: I need to create every Activity in single instance, so I put android:launchMode="singleInstance"
in Manifest. But when I push 'Home' on the device and open it again the system clears the stack and opens the root Activity, not the last one that was open. How can I keep the last open Activity for the user but keep singleInstance
in Manifest?
EDIT: Manifest
...
<application
...>
<activity
android:name=".ui.login.LoginActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity
android:name=".ui.activity.MainActivity"
android:label="${app_title_constant}"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<data android:scheme="${scheme}"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
<activity
android:name=".ui.more.service.ScannerActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"/>
<activity
android:name=".ui.activity.CardsListForSendActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity
android:name=".ui.activity.CountriesActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity
android:name=".ui.activity.StepperCardPurchaseActivity"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<service
android:name=".service.CacheContactsIntentService"
android:exported="false"/>
<service
android:name=".managers.push.PushNotificationExtenderService"
android:exported="false">
<intent-filter>
<action android:name="com.onesignal.NotificationExtender"/>
</intent-filter>
</service>
<receiver
android:name=".managers.push.PushBroadcastReceiver"
android:enabled="true">
</receiver>
</application>
</manifest>