问题
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?
Thanks
David
回答1:
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.
来源:https://stackoverflow.com/questions/11016944/does-an-android-widget-run-in-the-same-process-as-its-app