android - asyntasks dependencies -


i have android program have asyntask. when these asyntask finalize depending of result launch 1 asyntask or other asyntask. i'm tryng these code think works despite doesnt shows me progress dialog of primary asyntask. when comment if statement shows me progress dialog of first asyntask. how it? why don't show progress dialog of first asyntask.

lanzaping tarea = new lanzaping();  tarea.execute(); //first asyntask       try {         if (tarea.get()){             log.d(«prueba», «el resultado es .... « + tarea.get());             new tareawol().execute();         }else         {             log.d(«prueba», «el resultado es .... « + tarea.get());              new tareaping().execute();         }     } catch (interruptedexception e) {         // todo auto-generated catch block         e.printstacktrace();     } catch (executionexception e) {         // todo auto-generated catch block         e.printstacktrace();     } 

put if-statement in first asynctasks "onpostexecute"-method. should work. (if asking for)..


Comments