Real difference between AsyncTask and Thread

前端 未结 6 1216
有刺的猬
有刺的猬 2021-01-01 17:38

I have been reading Android documentation (AsyncTask, Thread) and vogella tutorial about this matter, but I have doubts yet.

For example, I want to send a message fr

6条回答
  •  情深已故
    2021-01-01 18:24

    AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

    You can control its own functions

    doInBackground(Params... params), onCancelled(), onPostExecute(Result result), onPreExecute(), nProgressUpdate(Progress... values), publishProgress(Progress... values)

提交回复
热议问题