【发布时间】:2010-06-26 16:05:40
【问题描述】:
我有一个服务,它请求另一个启动 AsyncTask 的类
服务->天气类->执行方法->Asynctask->执行
这是在服务中启动的
new Weather(this).execute(); // the execute is a method of the class, not of the AsyncTask
如何在 Service 中检测到 AsyncTask 已完成,以便调用 stopSelf?
【问题讨论】:
-
我没有完整的答案,因此只是评论。您不能在您的服务中使用 IBinder 并在您的 AsyncTask 的 onPostExecute() 中发送消息。 developer.android.com/reference/android/app/…
-
我的服务没有使用 IBinder 的东西。
标签: android service android-asynctask