I have 2 activtity MainActitvity(launchMode: standard) and DeepLinkingActivity(launchMode: standard)
<activity
android:name=".feature.deepLink.DeepLinkActivity"
android:launchMode="standard">
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="${deepLinkURI}"
android:path="@string/path_prefix"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".feature.main.MainActivity"
android:launchMode="standard"
android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/>
When the MainActivity is presented, I click on a link that will open the DeepLinkActivity. From the doc
https://developer.android.com/guide/components/activities/tasks-and-back-stack#ManifestForTasks
The DeepLinkingActivity should be started in the same Task as MainActivity and placed on the top of that Task. It appears not, MainActity and DeepLinkingActivity now live in 2 separate Tasks (Pressing back on DeepLinkingActivity navigates me to the Launcher screen instead of MainActivity).
I did try to change the launchMode of DeepLinkingActivity to singleTask. It started DeepLinkingActivity in the same task MainActivity but it also cleared the back stack (There is no MainActivity to go back to)
So, how can I make DeeplinkingActivity placed on top of MainActivity in the same Task when I start it from a deep link.