AsyncTask.Status

  • AsyncTask.Status is an enum that indicates the current status of an AsyncTask, which can be PENDING, RUNNING, or FINISHED.

  • Each status is set only once during the task's lifetime and is reflected through the execution stages (before execution, during execution, and after execution).

  • AsyncTask.Status inherits methods from java.lang.Enum, java.lang.Object, and java.lang.Comparable providing functionalities for comparison, object management, and enumeration operations.

  • Developers can use this enum to monitor the progress of an AsyncTask and trigger actions based on the current state.

public static final enum AsyncTask.Status extends Enum<AsyncTask.Status>

Indicates the current status of the task. Each status will be set only once during the lifetime of a task.

Inherited Method Summary

Enum Values

public static final AsyncTask.Status FINISHED

Indicates that AsyncTask.onPostExecute(Result) has finished.

public static final AsyncTask.Status PENDING

Indicates that the task has not been executed yet.

public static final AsyncTask.Status RUNNING

Indicates that the task is running.