难道一个Android窗口小部件在同一个进程中运行,因为它的应用程序 [英] Does an android widget run in the same process as it's app

查看:136
本文介绍了难道一个Android窗口小部件在同一个进程中运行,因为它的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创造我的应用程序绑定服务,并希望它可以利用的部件在未来应该怎么决定创建一个使用。为了决定是否使用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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆