Reputation: 8338
If an application begins a Service
via bindService
or startService
, will this Service object ever run from a process different from that of the application?
I ask because many Android example projects begin a service and communicate to them using IPC which seems wholly unnecessary considering that, according to the Android Service
documentation, "... services, like other application objects, run in the main thread of their hosting process."
IPC, AIDL, and the IBinder
interface only seem useful if connecting to a Service
started by an application other than your own.
Is this a correct or fair understanding?
Upvotes: 0
Views: 844
Reputation: 1006819
If an application begins a Service via bindService or startService, will this Service object ever run from a process different from that of the application?
Yes, usually if the service is implemented in another application.
I ask because many Android example projects begin a service and communicate to them using IPC
Really?
IPC, AIDL, and the IBinder interface only seem useful if connecting to a Service started by an application other than your own.
IPC and AIDL, yes. Binder, no. You can use that locally too.
Upvotes: 1