Created
July 11, 2013 20:45
-
-
Save mypplication/5979085 to your computer and use it in GitHub Desktop.
Class AsyncTask for all android version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class AsyncTaskBase<Param, Progress, Result> extends AsyncTask<Param, Progress, Result> | |
{ | |
@TargetApi(11) | |
public final void executeCompat(Param... params) | |
{ | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) | |
this.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params); | |
else | |
this.execute(params); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment