My app can run multiple times. I start it, press home, then click the app icon again, then i exit the app two times. How is th开发者_开发百科is possible on android?
This is by design, look up android:launchMode on this page, which states:
An activity with the "standard" or "singleTop" launch mode can be instantiated multiple times. In contrast, "singleTask" and "singleInstance" activities can only begin a task. They are always at the root of the activity stack. Moreover, the device can hold only one instance of the activity at a time — only one such task.
精彩评论