是否可以在后台启动一个Activity
?我需要这样一个 Activity
,它可以在后台运行并根据需要生成其他 Activity 以响应向我的主屏幕小部件发出的用户命令。
最佳答案
Is it possible to start an Activity in the background?
没有。
I need such an Activity that can operate in the background and spawn other Activities as needed in response to user commands issued to my Home Screen widget.
您的 AppWidgetProvider
可以“根据需要生成其他 Activity 以响应向我的主屏幕小部件发出的用户命令”,假设您所说的“用户命令”是指“点击”。
关于Android:如何在后台启动一个 Activity ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3401840/