难道一个Android窗口小部件在同一个进程中运行,因为它的应用程序 [英] Does an android widget run in the same process as it's app
问题描述
我要创造我的应用程序绑定服务,并希望它可以利用的部件在未来应该怎么决定创建一个使用。为了决定是否使用Messenger或延长活页夹我需要知道一个小部件,并在同一个进程及其相应的应用程序运行?
I want to create a bound service for my app and would like it to be available for a widget to use in the future should i decide to create one. In order to decide whether to use a Messenger or extend Binder i need to know whether a widget and its corresponding app run in the same process?
感谢
大卫
推荐答案
是的。除非你在清单中另有指定(使用安卓程序=...
),应用程序的所有组件(部件供应商,服务,活动,广播接收器)运行在相同的过程中,使用相同的虚拟机和在同一存储器空间中运行。
Yes. Unless you specify otherwise in the manifest (using android:process="..."
), all components of an application (widget providers, services, activities, broadcast receivers) run in the same process, use the same Virtual Machine and run in the same memory space.
这篇关于难道一个Android窗口小部件在同一个进程中运行,因为它的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!