Java android.os AsyncTask fields, constructors, methods, implement or subclass

Example usage for Java android.os AsyncTask fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os AsyncTask.

The text is from its open source code.

Subclass

android.os.AsyncTask has subclasses.
Click this link to see all its subclasses.

Field

ExecutorTHREAD_POOL_EXECUTOR
An Executor that can be used to execute tasks in parallel.
ExecutorSERIAL_EXECUTOR
An Executor that executes tasks one at a time in serial order.

Constructor

AsyncTask()
Creates a new asynchronous task.

Method

booleancancel(boolean mayInterruptIfRunning)

Attempts to cancel execution of this task.

AsyncTaskexecute(Params... params)
Executes the task with the specified parameters.
voidexecute(Runnable runnable)
Convenience version of #execute(Object) for use with a simple Runnable object.
AsyncTaskexecuteOnExecutor(Executor exec, Params... params)
Executes the task with the specified parameters.
Resultget()
Waits if necessary for the computation to complete, and then retrieves its result.
Resultget(long timeout, TimeUnit unit)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result.
StatusgetStatus()
Returns the current status of this task.
booleanisCancelled()
Returns true if this task was cancelled before it completed normally.
StringtoString()
Returns a string representation of the object.