开发者

Can an application's Service ever run in a different process?

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开发者_Go百科 fair understanding?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜