I created app which searches through the filesystem of android phone, and I would like to update notification in notification bar with information which current file is being searched.
Firstly I wanted to use AsyncTask but then I found that it should not be used with long running operations which searching through filesystem I believe is. From the docs
AsyncTasks should ideally be used for short operations (a few seconds at the most.
Their advice is to use Executor, ThreadPoolExecutor and FutureTask. But no examples is specified. So what exactly should one do to implement this correctly? Can someone give me an example? I don't know if I should have some private class which extends AsyncTask and put run method of outer class to doInBackground method or something..