Widget Launches the Applications Main Activity unexpectedly. Should I just not have a Main activity when I have an app that hosts a widget? Not clear why it launches, but this is not the beha开发者_运维知识库vior I want. I want no activities to Launch unless they are specifically requested by intent to do so?
Try adding android:launchMode="singleInstance"
to the main activity's definition in your manifest
as suggested here.
<activity
android:name=".YourActivity"
android:launchMode="singleInstance" ...
精彩评论