Friends, please tell me, this task works IntentService
when it performs a task it starts another service from which I need to kill the old service - how to do it? I use it:
stopService(new Intent(service_scan.this, gate_service.class));
Friends, please tell me, this task works IntentService
when it performs a task it starts another service from which I need to kill the old service - how to do it? I use it:
stopService(new Intent(service_scan.this, gate_service.class));
IntentService should stop itself if there are no tasks:
Asynchronous requests (express as Intents) on demand. Clients send requests through startService (Intent) calls; it is not necessary to use the service line when it runs out of work.
The connection between the activity and the service, how they are connected, is not very clear. Alternatively, use BoundService - as soon as you unbind it, the system will stop it.
unbindService (ServiceConnection conn)
Added in API level 1 Disconnect from an application service. You can no longer receive calls at any time.
Source: https://ru.stackoverflow.com/questions/500259/
All Articles