How to implement callbacks using IntentService on Android?

独自空忆成欢 提交于 2019-12-01 07:16:46
Zsombor Erdődy-Nagy

You might be looking for the ResultReceiver class (http://developer.android.com/reference/android/os/ResultReceiver.html).
You extend it, pass it along with the intent you invoke the Service with (it's parcelable), then when your task completes in the Service, you call the ResultReceiver's onReceiveResult() method with the results.

SohailAziz

checkout this post :Using ResultReceiver in Android , discussing the implementation of resutlreceiver.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!