Enoobong
Enoobong

Reputation: 1734

What decides the parameters to pass in to the AsynTask class <>?

I am relatively a newbie in android though have intermediate knowledge of Java. I am trying to understand

AsyncTask<>

I notice different parameters are passed e.g

AsyncTask<Object, String, Boolean>
AsyncTask<Integer, Void, Bitmap>

into the angle brackets. Please What should or can those parameters be? Thanks Community.

Upvotes: 1

Views: 59

Answers (1)

Alexander
Alexander

Reputation: 48262

The first param goes to doInBackground, the second to onProgressUpdate, the third parameter is what your doInBackground returns and it goes to onPostExecute

Upvotes: 1

Related Questions