开发者

Same app running multiple times

开发者 https://www.devze.com 2023-03-22 13:17 出处:网络
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:l

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消