android - How IntentService stops automatically while Service needs an stopService() call to stop it? -
How is it that an intent service automatically turns off, while one stop service to stop a normal service () Calls required? How does it work internally?
IntentService calls to StopSelf () when there are any other tasks (intents) in order to process the queue bus To see it, check the IntentService.java source on the site like androidxref.com:
More accurate (check Czech 66 on the provided link): Do not queue in, but every time the Stop SSL (Int) call StopSelf () version which takes an initial (int) as the parameter, actually checks that If there is no new start command to start any service that still has to be handled. Because there is only one worker thread in the IntentService that progressively processes the intrant, this test is similar to testing "queue is empty".
Comments
Post a Comment