How do you prevent an Android Wear activity from having multiple instances?

前端 未结 1 1420
无人及你
无人及你 2021-02-10 00:25

Sometimes, most of the time when my LG G watch closes the app automatically by going to sleep/dim mode, if I open the app again by going to the start menu there are two instanc

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-10 00:50

    Have you looked at the android:launchMode attribute in the AndroidManifest.xml for the activity?

    perhaps android:launchMode="singleInstance" will help you out.

    http://developer.android.com/guide/topics/manifest/activity-element.html#lmode

    0 讨论(0)
提交回复
热议问题