multithreading - How to run three thread with runMultipleAsyncTask in android? -


i have 3 asynctask. want run 3 thread simultaneous. run 2 asynctask simultaneous under code :

@targetapi(build.version_codes.honeycomb) public void runmultipleasynctask(int id) { int currentapiversion = android.os.build.version.sdk_int; if (id == encrypt) {          encryptedd asynctask_encrypt = new encryptedd();         progressdialogg asynctask_progress = new progressdialogg(asynctask_encrypt);         if (currentapiversion >= android.os.build.version_codes.honeycomb) {             asynctask_encrypt.executeonexecutor(asynctask.thread_pool_executor);         } else {             asynctask_encrypt.execute();         }         if (currentapiversion >= android.os.build.version_codes.honeycomb) {             asynctask_progress.executeonexecutor(asynctask.thread_pool_executor);         } else {             asynctask_progress.execute();         }     }     if (id == decrypt){         decryptedd asynctask2 = new decryptedd();         progressdialogg asynctask = new progressdialogg(asynctask2);         if (currentapiversion >=                 android.os.build.version_codes.honeycomb) {             asynctask2.executeonexecutor(asynctask.thread_pool_executor);         } else {             asynctask2.execute();         }         if (currentapiversion >=                 android.os.build.version_codes.honeycomb) {             asynctask.executeonexecutor(asynctask.thread_pool_executor);         } else {             asynctask.execute();         }     } } 

how run 3 thread runmultipleasynctask in android studio?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -