UploadTask

class UploadTask : StorageTask

An controllable task that uploads and fires events for success, progress and failure. It also allows pause and resume to control the upload operation.

Summary

Nested types

Encapsulates state about the running UploadTask

Protected functions

Unit
Unit

Inherited functions

From com.google.firebase.storage.CancellableTask
abstract CancellableTask

Adds a listener that is called periodically while the ControllableTask executes.

abstract CancellableTask
addOnProgressListener(
    activity: Activity,
    listener: OnProgressListener<Any!>
)

Adds a listener that is called periodically while the ControllableTask executes.

abstract CancellableTask
addOnProgressListener(
    executor: Executor,
    listener: OnProgressListener<Any!>
)

Adds a listener that is called periodically while the ControllableTask executes.

From com.google.firebase.storage.ControllableTask
abstract ControllableTask

Adds a listener that is called when the Task becomes paused.

abstract ControllableTask

Adds a listener that is called when the Task becomes paused.

abstract ControllableTask

Adds a listener that is called when the Task becomes paused.

From com.google.firebase.storage.StorageTask
StorageTask

Adds a listener that is called if the Task is canceled.

StorageTask

Adds an Activity-scoped listener that is called if the Task is canceled.

StorageTask

Adds a listener that is called if the Task is canceled.

StorageTask

Adds a listener that is called when the Task succeeds or fails.

StorageTask
addOnCompleteListener(
    activity: Activity,
    listener: OnCompleteListener
)

Adds a listener that is called when the Task succeeds or fails.

StorageTask
addOnCompleteListener(
    executor: Executor,
    listener: OnCompleteListener
)

Adds a listener that is called when the Task succeeds or fails.

StorageTask

Adds a listener that is called if the Task fails.

StorageTask

Adds a listener that is called if the Task fails.

StorageTask

Adds a listener that is called if the Task fails.

StorageTask

Adds a listener that is called when the Task becomes paused.

StorageTask

Adds a listener that is called when the Task becomes paused.

StorageTask

Adds a listener that is called when the Task becomes paused.

StorageTask

Adds a listener that is called periodically while the ControllableTask executes.

StorageTask
addOnProgressListener(
    activity: Activity,
    listener: OnProgressListener<Any!>
)

Adds a listener that is called periodically while the ControllableTask executes.

StorageTask
addOnProgressListener(
    executor: Executor,
    listener: OnProgressListener<Any!>
)

Adds a listener that is called periodically while the ControllableTask executes.

StorageTask

Adds a listener that is called if the Task completes successfully.

StorageTask
addOnSuccessListener(
    activity: Activity,
    listener: OnSuccessListener<Any!>
)

Adds a listener that is called if the Task completes successfully.

StorageTask
addOnSuccessListener(
    executor: Executor,
    listener: OnSuccessListener<Any!>
)

Adds a listener that is called if the Task completes successfully.

Boolean

Attempts to cancel the task.

Task
continueWith(
    continuation: Continuation
)

Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.

Task
continueWith(
    executor: Executor,
    continuation: Continuation
)

Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.

Task
continueWithTask(
    continuation: ContinuationTask!>
)

Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.

Task
continueWithTask(
    executor: Executor,
    continuation: ContinuationTask!>
)

Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.

Exception?

Returns the exception that caused the Task to fail.

ResultT

Gets the result of the Task, if it has already completed.

ResultT
Throwable?> getResult(exceptionType: Class)

Gets the result of the Task, if it has already completed.

ResultT

Returns the current state of the task.

Boolean

Returns true if the task has been canceled.

Boolean

Returns true if the Task is complete; false otherwise.

Boolean

Returns true if the task is currently running.

Boolean

Returns true if the task has been paused.

Boolean

Returns true if the Task has completed successfully; false otherwise.

Unit
Unit
Unit
Unit
Unit
Task
onSuccessTask(
    continuation: SuccessContinuation
)

Returns a new Task that will be completed with the result of applying the specified SuccessContinuation to this Task when this Task completes successfully.

Task
onSuccessTask(
    executor: Executor,
    continuation: SuccessContinuation
)

Returns a new Task that will be completed with the result of applying the specified SuccessContinuation to this Task when this Task completes successfully.

Boolean

Attempts to pause the task.

StorageTask

Removes a listener.

StorageTask

Removes a listener.

StorageTask

Removes a listener.

StorageTask

Removes a listener.

StorageTask

Removes a listener.

StorageTask

Removes a listener.

Boolean

Attempts to resume a paused task.

From com.google.android.gms.tasks.Task

Protected functions

onCanceled

protected fun onCanceled(): Unit

resetState

protected fun resetState(): Unit