[英]open every time new Activity using broadcast reciever in android
I want to open an activity using broadcast receiver. 我想使用广播接收器打开一个活动。 I am implement it and it works fine when activity not running in background.
我实现了它,并且当活动不在后台运行时它可以正常工作。 But if activity is running in background then it can't launch new activity it return same activity, but i want to open this activity again, means multiple instance of the activity
但是,如果活动在后台运行,则无法启动新活动,它会返回相同的活动,但是我想再次打开此活动,这意味着该活动的多个实例
so, please help me how I can do this. 因此,请帮助我该怎么做。
So you want Intent.FLAG_ACTIVITY_NEW_TASK
所以你想要
Intent.FLAG_ACTIVITY_NEW_TASK
Refer: http://developer.android.com/reference/android/content/Intent.html 请参阅: http : //developer.android.com/reference/android/content/Intent.html
Edit: 编辑:
Or perhaps, FLAG_ACTIVITY_MULTIPLE_TASK
. 也许是
FLAG_ACTIVITY_MULTIPLE_TASK
。 But it's not recommended as it messes with the navigational path of user. 但不建议这样做,因为它会干扰用户的导航路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.