'android, how to back to the app when backpress from the deeplink opened activity
Having a android app which has mainActivity, and other activities, say it has a settingsActivity.
The app has deeplink setup to open the settingsActivity.
<activity android:name=".SettingsActivity"
android:launchMode="singleTop">
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:scheme="settingsscheme"
android:host="www.settings.com"
android:pathPrefix="/settingspath" />
</intent-filter>
</activity>
when a deeplink url settingsscheme://www.settings.com/settingspath?id=eee888\ is encountered the SettingsActivity will be open.
But when the app is killed, when this deeplink url causes SettingsActivity open, and then back press, the SettingsActivity will be closed but not back to the mainActivity of the app.
In the case of the app is killed, and backpress from an app's sub activity, how to bring up the mainActivity of the app?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
