What are some methods that allow you to use one AsyncTask for different requests?
If we consider that there is a need to call different functions from different classes in onPostExecute .
What are some methods that allow you to use one AsyncTask for different requests?
If we consider that there is a need to call different functions from different classes in onPostExecute .
OKHTP has its own request execution mechanism asynchronously, described here https://github.com/square/okhttp/wiki/Recipes#asynchronous-get In most cases when you make small requests, most likely this will be enough than wrapping AsyncTask. The same mechanism uses Retrofit for an asynchronous call.
Source: https://ru.stackoverflow.com/questions/858920/
All Articles