我想从我自己的应用程序中的另一个应用程序启动一个活动。我可以控制这两个应用程序。
对于它,我正在使用明确的意图并且效果很好。
Intent intent = new Intent();
ComponentName componentName = new ComponentName("br.com.example.app","br.com.exemple.app.myactivity");
intent.setComponent(componentName);
当我点击概览按钮时出现问题,当概览屏幕(最近屏幕)时,新应用程序出现在同一项目内。因此,用户可以确定他是App1还是App2。实际上,他会认为他还在App1里面。
如何强制它出现在概览屏幕上的其他项目上?
我已经尝试过使用
了intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
和
<activity
android:name=".myactivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/ApiBaseThemeNoActionBar"
android:documentLaunchMode="always">
</activity>
仅使用startActivity(intent)时似乎运行良好。
答案 0 :(得分:0)