views:

66

answers:

1

I have a service, that requests another class, which launches an AsyncTask

Service->Weather Class->Execute Method->Asynctask->Execute

this is launched in the service by

new Weather(this).execute(); // the execute is a method of the class, not of the AsyncTask

how do I detect in Service that the AsyncTask finished so I can call stopSelf?

+3  A: 

You can use stopService(intent) in this case.

Macarse
Excellent. From @Doc If the service is not running, nothing happens.
Pentium10