This tutorial shows how to work with threads in Android. AsyncTask can be used for the operation like Network Call without interrupting UI thread. This class can be used to perform background operations and casting results on the UI thread without having to manipulate threads and/or handlers to make complications to the application. On Network Calls on UI thread, hence waits for the result and it may crash the application, So the best way to perform background operations using AsyncTask etc..
AsyncTask is done to be a helper class around Handler and Thread and it doesn’t follow a generic threading framework.It can be mainly used for any small operation which can be done [...]