Posts

Showing posts from July, 2021

Date 4/jul

  Asynctask -  Android AsyncTask is an abstract class provided by Android which gives us the liberty to perform heavy tasks in the background and keep the UI thread light thus making the application more responsive. ------------------------------------------------------------------------------------------------------------ The basic methods used in an android AsyncTask class are defined below : doInBackground() : This method contains the code which needs to be executed in background. In this method we can send results multiple times to the UI thread by publishProgress() method. To notify that the background processing has been completed we just need to use the return statements onPreExecute() : This method contains the code which is executed before the background processing starts onPostExecute() : This method is called after doInBackground method completes processing. Result from doInBackground is passed to this method onProgressUpdate() : This method receives progress upd...