I know this Question has been asked many times but all answers I got wasn't clear for Me.
I want to implement a File deletion process. I discovered that to do this kind of work it's recommended to run all the process in a separated thread.
For that, I can use AsyncTask
, Handler
and Thread
. AsyncTask
seems to be a good solution. However, AsyncTask
is designed for small task. (When i try to delete a file whose length is more than 1G, AsyncTask
crashes or doesn't execute onPostExecute
.
Others thread handlers (Thread
, Runnable
...) can't manage UI (Update UI or show progress).
My Question is What is the good thread handler for Long tasks and How to manage UI with it.