0

I added singleTask attribute to MainActivity(A) to avoid loading the activity multiple times. After the other activity(B) is on MainActivity(A->B), if I go back to home screen by pressing home button and re-launch the application, there is no B (A->B->HOME->A)

There IS an answer in here, saying to add FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_SINGLE_TOP every time calling A Activity.

BUT, I have a Intent data scheme in Manifest file, and the application should be launched by the scheme.

Please, help me...

Community
  • 1
  • 1

1 Answers1

0

It sounds to me like Android is launching your MainActivity(A) again after you return to the HOME screen. This shouldn't happen, but is a long-standing nasty Android bug. See my answer to this question for more information.

Community
  • 1
  • 1
David Wasser
  • 93,459
  • 16
  • 209
  • 274