Any worker thread runs in background, since it is not intended to loop, is not connected to a Looper.for example doInBackground().
its implementation returns will be passed to onPostExecute() which runs on the UI thread.
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:121) at android.widget.Toast.(Toast.java:68) at android.widget.Toast.makeText(Toast.java:231)