Reputation: 35044
As we know difference between Service and IntentService is that IntentService implicitly spawn worker thread whereas Service run on process main (UI) thread.
That is apparently showing what the difference between them.
But my question is that is there any difference between
Service + android:process "vs" IntentService
I mean to say if we launch Service in a separate process than still any difference between them except Service uses Process whereas IntentService uses Thread.
Upvotes: 1
Views: 815
Reputation: 14590
You are completely misundertand the Concept of Process
and Thread
.
IntentService run in a diffrent Thread but run in main process.
For Every Application by default there is a only one process,in which all of your code will run including Services
,Activitys
And IntentService
too.
When ever you start your Service
in a new process then that Service
has allocated with separate memory and heap area.It will not directly communicate with the main process.For communication purpose you need to use AIDL
For more info check this Process and Threads
Upvotes: 5