Here's scenario:
- Client makes remote call to the service (returns void) and provides a callback object
- Service executes some long running logic on the background thread and then uses callback object to trigger ether success or failure which (since these manipulate visual elements) execute in Activity#runOnUiThread block
The scenario runs fine. The question is - can I use AsyncTask to make code less verbose (how?) and would be there any advantages in doing it that way?
Or should I just get away from client callbacks alltogether and execute remote service calls retrofitted to return some value within AsyncTask#doInBackground?