2016-12-07 160 views
0

当应用程序不在前台并调用startActivity时,应用程序不会显示新活动。这只发生在低端设备上。 如何确保活动已启动?当应用程序处于后台时活动不会启动

部分清单为次活动的

<activity 
    android:name=".OfferActivity" 
    android:configChanges="orientation|screenSize" 
    android:label="@string/title_activity_offer" 
    android:launchMode="singleTop" 
    android:noHistory="true" 
    android:showOnLockScreen="true"/> 
+0

喜股的manifest.xml –

+1

删除'机器人:launchMode = “singleTop” 和'请尝试 –

+0

您可以在您的清单中添加以下活动: Vinodh

回答

0

尝试启动这样的活动:

Intent i = new Intent(context, MyActivity.class); 
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
context.startActivity(i); 
+0

我没有帮助 – pepela

+0

你可以显示任何logcat来帮助我们吗?所提供的信息实际上是不可能的..... – zapotec

相关问题