java - How to manage number of threads inside Sync Task -


what looking find way manage number of threads inside asyntask.

i need sync local database server updates. might large data can retrieved using paging.

can tell me preferred way manage generating threads in loop inside asyntask display progress dialog until of thread completed.

i little worried local database object & synchronization during execution of different threads in order download data server & save/update local database.

note: cant download data server in single server call.

thanks in advance.

if it's long running operation should use intentservice instead of asynctask. intentservice ui independent can run in background. update ui can send broadcast intent. use intentservice db sync. data server, while parsing create batch updates , update local db 1 batch update.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -