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<StateT!>

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

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

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

abstract CancellableTask<StateT!>
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<StateT!>

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

abstract ControllableTask<StateT!>

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

abstract ControllableTask<StateT!>

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

From com.google.firebase.storage.StorageTask
StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

StorageTask<ResultT!>
addOnCompleteListener(
    activity: Activity,
    listener: OnCompleteListener<ResultT!>
)

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

StorageTask<ResultT!>
addOnCompleteListener(
    executor: Executor,
    listener: OnCompleteListener<ResultT!>
)

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

StorageTask<ResultT!>

Adds a listener that is called if the Task fails.

StorageTask<ResultT!>

Adds a listener that is called if the Task fails.

StorageTask<ResultT!>

Adds a listener that is called if the Task fails.

StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

StorageTask<ResultT!>

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

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

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

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

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

StorageTask<ResultT!>

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

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

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

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

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

Boolean

Attempts to cancel the task.

Task<ContinuationResultT!>
<ContinuationResultT> continueWith(
    continuation: Continuation<ResultT!, ContinuationResultT!>
)

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

Task<ContinuationResultT!>
<ContinuationResultT> continueWith(
    executor: Executor,
    continuation: Continuation<ResultT!, ContinuationResultT!>
)

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

Task<ContinuationResultT!>
<ContinuationResultT> continueWithTask(
    continuation: Continuation<ResultT!, Task<ContinuationResultT!>!>
)

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

Task<ContinuationResultT!>
<ContinuationResultT> continueWithTask(
    executor: Executor,
    continuation: Continuation<ResultT!, Task<ContinuationResultT!>!>
)

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
<X : Throwable?> getResult(exceptionType: Class<X!>)

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<ContinuationResultT!>
<ContinuationResultT> onSuccessTask(
    continuation: SuccessContinuation<ResultT!, ContinuationResultT!>
)

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<ContinuationResultT!>
<ContinuationResultT> onSuccessTask(
    executor: Executor,
    continuation: SuccessContinuation<ResultT!, ContinuationResultT!>
)

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<ResultT!>

Removes a listener.

StorageTask<ResultT!>

Removes a listener.

StorageTask<ResultT!>

Removes a listener.

StorageTask<ResultT!>

Removes a listener.

StorageTask<ResultT!>

Removes a listener.

StorageTask<ResultT!>

Removes a listener.

Boolean

Attempts to resume a paused task.

From com.google.android.gms.tasks.Task
Task<TResult!>!
Task<TResult!>!
abstract Task<TResult!>!
abstract Task<TResult!>!
Task<TContinuationResult!>!
<TContinuationResult> continueWith(
    p: Continuation<TResult!, TContinuationResult!>!
)
Task<TContinuationResult!>!
<TContinuationResult> continueWithTask(
    p: Continuation<TResult!, Task<TContinuationResult!>!>!
)
abstract Exception!
abstract TResult!
abstract Boolean
abstract Boolean
abstract Boolean
Task<TContinuationResult!>!
<TContinuationResult> onSuccessTask(
    p: SuccessContinuation<TResult!, TContinuationResult!>!
)

Protected functions

onCanceled

protected fun onCanceled(): Unit

resetState

protected fun resetState(): Unit