Basically what you want to do is know when the async tasks were done in other threads. About doing it on java specifically you can read this it might give you a very good idea on how:
Check if there is errors after some asynctask
-
23-07-2023 - |
Pergunta
I have 2 main AsyncTask which goal is to syncronize my app.
uploadFile and SyncData
So, if I have 3 pic to upload, I will have 3+1 = 4 threads
Each process fill a global error variable. So what I need is to get a way to run this method after all threads are done. How can I do it???
for (Captura capt : lCapturassASync) {
uploadFile(capt, ctx); // Is also an AsyncTask
}
new SyncData(ctx, lTiendasASync, lCapturassASync).execute("upload_datos", null);
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow