0

I have Activity A which calls B, at which point let's say the user presses the home button:

1) If the user long presses the home button and brings out the recently launch application, it will bring the user back to activity B.

2) If the user opens my application via the shortcut ( pressing the icon of the application), it will create another instance of Activity A.

I did not set any launchMode for my activity, so I guess it's launchMode="standard", the default behaviour I want is to go back activity B.

Why is point number 2 happening? I always thought that both of the actions will lead to the same result.

SteD
  • 13,909
  • 12
  • 65
  • 76

2 Answers2

0

Every time it should call activity B unless Dalvik machine thinks that activity B is a background process and the process space might be required for other applications,
At that point your activity may be killed and it may launch afresh when you click the icon.

sat
  • 40,138
  • 28
  • 93
  • 102
0

It's weird...I did a total uninstall and reinstall of the app.

Without declaring launchMode, it's default to "standard", and it works just as designed.

SteD
  • 13,909
  • 12
  • 65
  • 76