There are few techniques to execute slow code that returns some data in Android. By slow code I mean network, file, database access etc.
ThreadandRunnablecan be used, but I found that getting produced data from aRunnableis hard/not productive.We can use
ServicewithBroadcast, but I found that this is also not productive technique.We have nice
AsyncTaskclass in Android.Is this last approach most productive way to execute slow background operations that return some data, or there is something better in Android?