I have AsyncTask and i want to write data to a file.
should I write data to the file in UI thread "OnProgressUpdate" or on the background thread "doInBackground"
I have AsyncTask and i want to write data to a file.
should I write data to the file in UI thread "OnProgressUpdate" or on the background thread "doInBackground"
onProgressUpdate() is used to operate progress of asynchronous operations via this method
This callback can be triggered from within the body of the doInBackground() method by calling publishProgress()
Reading and Writing is always better to do in background thread. Well it's always a better UX!