I am seeking an example of something that can be done with an IntentService
that cannot be done with a Service
(and vice-versa)?
I also bel
If someone can show me an example of something that can be done with an
IntentService
and can not be done with aService
and the other way around.
By definition, that is impossible. IntentService
is a subclass of Service
, written in Java. Hence, anything an IntentService
does, a Service
could do, by including the relevant bits of code that IntentService
uses.
Starting a service with its own thread is like starting an IntentService. Is it not?
The three primary features of an IntentService
are:
the background thread
the automatic queuing of Intent
s delivered to onStartCommand()
, so if one Intent
is being processed by onHandleIntent()
on the background thread, other commands queue up waiting their turn
the automatic shutdown of the IntentService
, via a call to stopSelf()
, once the queue is empty
Any and all of that could be implemented by a Service
without extending IntentService
.