-2

I would like to understand very clearly how the activity stack works and how to use intent flags (SINGLE_TOP, etc etc) in a correct way. For example, If I want to avoid to instantiate any new activity if it is already instantiated, how could I do?

Thanks a lot in advance guys.

Paride Letizia
  • 330
  • 1
  • 4
  • 23

1 Answers1

0

Well there is good official documentation for it.

If you really need bad solution like backstacking until you have needed activity from backstack you can do it using method getRunningTasks in ActivityManager, get position of activity you are searching for and backstack to it multiple times.

Andrey Danilov
  • 6,194
  • 5
  • 32
  • 56