ControllableTask
abstract class ControllableTask<StateT> : CancellableTask
| kotlin.Any | |||
| ↳ | com.google.android.gms.tasks.Task | ||
| ↳ | com.google.firebase.storage.CancellableTask | ||
| ↳ | com.google.firebase.storage.ControllableTask |
StorageTask |
A controllable Task that has a synchronized state machine. |
FileDownloadTask |
A task that downloads bytes of a GCS blob to a specified File. |
StreamDownloadTask |
A task that downloads bytes of a GCS blob. |
UploadTask |
An controllable task that uploads and fires events for success, progress and failure. |
Represents an asynchronous operation that can be paused, resumed and canceled. This task also receives progress and other state change notifications.
| Parameters | |
|---|---|
<StateT> |
the type of state this operation returns in events. |
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
abstract ControllableTask<StateT!> |
addOnPausedListener(listener: OnPausedListener<Any!>)Adds a listener that is called when the Task becomes paused. |
abstract ControllableTask<StateT!> |
addOnPausedListener(activity: Activity, listener: OnPausedListener<Any!>)Adds a listener that is called when the Task becomes paused. |
abstract ControllableTask<StateT!> |
addOnPausedListener(executor: Executor, listener: OnPausedListener<Any!>)Adds a listener that is called when the Task becomes paused. |
abstract Boolean |
isPaused() |
abstract Boolean |
pause()Attempts to pause the task. |
abstract Boolean |
resume()Attempts to resume this task. |
Inherited functions |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||
|
Public constructors
Public functions
addOnPausedListener
abstract fun addOnPausedListener(listener: OnPausedListener<Any!>): ControllableTask<StateT!>
Adds a listener that is called when the Task becomes paused.
| Returns | |
|---|---|
ControllableTask<StateT!> |
this Task |
addOnPausedListener
abstract fun addOnPausedListener(activity: Activity, listener: OnPausedListener<Any!>): ControllableTask<StateT!>
Adds a listener that is called when the Task becomes paused.
| Parameters | |
|---|---|
activity: Activity |
When the supplied |
| Returns | |
|---|---|
ControllableTask<StateT!> |
this Task |
addOnPausedListener
abstract fun addOnPausedListener(executor: Executor, listener: OnPausedListener<Any!>): ControllableTask<StateT!>
Adds a listener that is called when the Task becomes paused.
| Parameters | |
|---|---|
executor: Executor |
the executor to use to call the listener |
| Returns | |
|---|---|
ControllableTask<StateT!> |
this Task |