Skip to content Skip to sidebar Skip to footer

Are Context.startservice() Calls Guaranteed To Be Aquired By The Service In The Same Order They Were Sent?

Are context.startService() calls guaranteed to be aquired by the service in the same order they were sent? consider in activity: Intent intent; intent = new Intent(MyIntents.ADD_B

Solution 1:

Are context.startService() calls guaranteed to be aquired by the service in the same order they were sent?

While I think they happen to occur in order, AFAIK this is not documented behavior, and therefore I would not count upon it.

Some action can hve much common work, I could optimize service if i were sure that they are executed in a batch.

Then only call startService() once, with everything in your "batch". Intent extras support arrays for many types, so try packaging an array of extras instead of just one.

Post a Comment for "Are Context.startservice() Calls Guaranteed To Be Aquired By The Service In The Same Order They Were Sent?"