Suppose I have an activity A that starts activity B and kills itself. Now I press the Home button (or leave the app some other way) (causing onPause->onStop for activity B) and I click the app icon in the launcher again. What happens is that activity A is started again (of course because I specified that intent-filter in the manifest XML). Is there an easy way to just get back to activity B without starting activity A again? I basically want to get to onStart->onResume in activity B when I reopen the app.
My intent-filter looks like this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Maybe I have a workaround solution.
How about using a transparent activity as the launcher?
When B pause or stop, remember it (in file, db etc.) In the launcher activity, something like a welcome screen but with a transparent view, read the record, and start the recorded activity.
Another solution, but not sure if it works.
Write a broadcast receiver with a launcher filter, and then launch the recorded activity.