How to implement callbacks using IntentService on Android?

Should it be implemented using AIDL? And please kindly provide an example, thanks.

EDIT: There are several solutions. Does anyone know which is better?

+4
source share
2 answers

You might be looking for the ResultReceiver class ( http://developer.android.com/reference/android/os/ResultReceiver.html ).
You extend it by passing it along with the intention to call Service c (it can be calculated), and then when your task completes in Service , you call the ResultReceiver onReceiveResult() method with the results.

+9
source

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

0
source

All Articles