문제

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);
도움이 되었습니까?

해결책

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:

How to know if other threads have finished?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top