AsyncTask as a subclass

0

I have a AsyncTask which works fine but I want to implement another AsyncTask . My question is whether two subclasses can be done within a class and that each of the subclasses implements AsyncTask . Is my approach correct?

    
asked by Javier fr 03.12.2016 в 20:53
source

1 answer

1

If you can do it, but you can only call your second Asynctask from the methods

  

onProgressUpdate ()

or from

  

onPostExecute ()

of your first AsyncTask .

It would be something like that from your first Asynctask :

 @Override
     protected void onPostExecute(String result){
         super.onPostExecute(result);
         llamadaSegundoHilo(misParametros)
    }
    
answered by 04.12.2016 в 16:20