Android:如何在后台启动Activity [英] Android: How to start Activity in background
本文介绍了Android:如何在后台启动Activity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通常,我使用以下代码开始活动:
Usually I start an activity with this code:
Intent i = new Intent(context, MyActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
但是我如何开始活动,使活动留在后台?
But how do I start the activity so that is left in the background?
推荐答案
You should use Services for this - in addition the Class Description.
这篇关于Android:如何在后台启动Activity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文