Hi folks, I need to guarantee that my Android application won't be launched twice. How to do it? I mean in ideal I would need in case of second launch just switch to primary copy.
+1
A:
According to the Android activity lifecycle, it shouldn't be possible to start a second copy on an activity. If it isn't terminated, it will resume the running instance.
Andrew Koester
2010-10-21 16:43:07
You can most definitely have multiple "copies" of activities running. The lifecycle chart has nothing to do with this
Falmarri
2010-10-21 17:46:11
Andrew: I know that I have managed to launch several copies of my application... How you can explain it?
barmaley
2010-10-22 05:14:21
A:
That is the normal behavior of app launching. You don't need to do anything special. (And definitely do not at all use the android:launchMode="singleInstance" option. That is a very special behavior that is probably not what you want.)
hackbod
2010-10-21 17:18:02