About AsyncTask Generics

Since there were few articles that described what should be specified for the generic type of the (?) AyncTask class that is often used in Android development, I will share it.

AsyncTask<Params, Progress, Result>

Specify three generic types for the AsyncTask class.

When I explain roughly, it will be as follows

AsyncTask<Params, Progress, Result>

Specify with Void if you do not use a value etc. with 3 arguments

reference

http://d.hatena.ne.jp/Nagise/20120309/1331265123 https://dev.classmethod.jp/smartphone/android/asynctask/

Recommended Posts

About AsyncTask Generics
[Swift] About generics
About =
About method.invoke
About Kotlin
About attr_accessor
About Hinemos
About inheritance
About params
About Docker
About Rails 6
About form_for
About Spring ③
About enum
About polymorphism
About Optional
About hashes
About JitPack
About Dockerfile
About this ()
About devise
About encapsulation
About Docker
About JAVA_HOME
About active_hash
About static
About exceptions
[Java] Generics
About scope
[Maven] About Maven