Reputation: 21
My application has 2 launch activities A and B. Activity B has taskAffinity="Task2".
1) Launch B from android menu, change some fields there, then press home button.
2) Launch activity A. From A, launch B with flag FLAG_ACTIVITY_NEW_TASK. This fields are not saved. Thats the problem.
Now there is this:
But I want this:
Help me please. I want to apologise in advance, this is my first post and my english is not good.
I found answer. In manifest file need to write android:launchMode="singleTop" for activity B.
Upvotes: 1
Views: 526
Reputation: 1
You can set
android:launchMode="singleTop"
or
android:launchMode="singleTask"
or
android:launchMode="singleInstance"
depending on your actual need. All of the three will achieve what you want.
Upvotes: 0