In an AsyncTask you can put a condition where depends on the data you get perform the corresponding functions? Example, I have an AsyncTask that from the beginning sent an array but now I want to modify that AsyncTask but not only could the class that used the array be able to use it, now I want it to be occupied by another class and depending on what is ordered what corresponds to you.
I clarify that the AsyncTask I have it separately in a class.
In a class I send the AsyncTask a JSONObject
new UploadImage().execute(jsonObject);
From another class I send the AsyncTask a Bitmaps ArrayLIst
new UploadImage().execute(listOfBitmaps);
But as valid in that AsycTack what they send me because everyone does different things but I just want to occupy that AsycTask so I do not have to create another one
@Override
protected Void doInBackground(Object... params) {//ejecuta nuestras tareas principales
}