Develop an application in Cordova, which synchronizes with an online database, the sync part is all in Java. (Context of the app)
I'm developing a "Log" screen for synchronization which will show the user how many records have been successfully synchronized, how many with error and their errors.
Through research I came to the conclusion that I should use a Thread to listen to the synchronization.
The question is this: I saw in the documentation that AsyncTask should be used for tasks of the order of a few seconds of execution and for longer tasks use Executor, ThreadPoolExecutor and FutureTask. Syncing usually takes up to hours at the first sync. Should I really use the second option? If so, someone has a good tutorial that shows me how to do it because what I researched I can not apply to my problem.
Why can not AsyncTask be used for time-consuming tasks?