[英]How to make sure that the launcher activity always run when the app is launched from the home
I have 2 activities in my app. 我的应用程序中有2个活动。 The A activity is the launcher one.
A活动是启动器之一。 When I run the app the very first time, the launcher activity runs, but when I press the home button and restart the app from there by clicking the app icon, I always get the B activity running.
第一次运行应用程序时,启动器活动将运行,但是当我按下主屏幕按钮并通过单击应用程序图标从那里重新启动应用程序时,我总是使B活动运行。
I want to make sure that the activity A should always run when starting the app. 我想确保活动A在启动应用程序时始终运行。
This is the manifest code: 这是清单代码:
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
<activity
android:name="com.velosys.smsManager.Activities.a"
android:clearTaskOnLaunch="true"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.velosys.smsManager.Activities.b" />
</application>
I have searched a lot for this but did not get any clue. 我为此进行了很多搜索,但没有任何线索。
也许活动B上的android:launchMode =“ singleInstance”会完成它吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.