I think I’ve got the point of IntentService class. it handles a queue which prevents too or more instances of the service been executed together.
I’ve found it useful, but what if I have too derived classes from IntentService which have different purpose, and I want both of them running together without waiting to each other?
It was great if there is any flag or attribute I can set, that will say something like: “allow to too or more diffrent derived class of intent service to run each one on his own queue”
is there any way doing that?
I know about all the other alternatives such as “regular” service, AsyncTesk, manually manage threads, so please don’t suggest me consider using them instead. I know their advantages and limitations.
thanks in advance.
There’s nothing preventing two
IntentServices from executing together.As an example, given a service,
ServiceAand a subclass of
ServiceAaptly namedServiceBServiceBwill not share an executor/queue (or anything else for that matter) withServiceA, i.e. both can execute at the same time. You can easily test this by putting a loop inServiceA, e.g.and then calling
from your
Activity. They will both be running at the same time.