Summary: Nested Classes | Inherited Fields | Protected Methods | Inherited Methods | [Expand All]
public class

# UploadTask

extends StorageTask<UploadTask.TaskSnapshot>

java.lang.Object
↳ | com.google.android.gms.tasks.Task<com.google.firebase.storage.UploadTask.TaskSnapshot>
| ↳ | com.google.firebase.storage.CancellableTask<com.google.firebase.storage.UploadTask.TaskSnapshot>
|  | ↳ | com.google.firebase.storage.ControllableTask<com.google.firebase.storage.UploadTask.TaskSnapshot>
|  |  | ↳ | com.google.firebase.storage.StorageTask<com.google.firebase.storage.UploadTask.TaskSnapshot>
|  |  |  | ↳ | com.google.firebase.storage.UploadTask

## Class Overview

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 Classes
class | UploadTask.TaskSnapshot | Encapsulates state about the running `UploadTask`

[Expand] Inherited Fields
From class com.google.firebase.storage.StorageTask
protected final Object | mSyncObject |

Protected Methods
void | onCanceled()
void | resetState()
void | schedule()

[Expand] Inherited Methods
From class com.google.firebase.storage.StorageTask
StorageTask<UploadTask.TaskSnapshot> | addOnFailureListener(Activity activity, OnFailureListener listener) Adds a listener that is called if the Task fails.
StorageTask<UploadTask.TaskSnapshot> | addOnFailureListener(OnFailureListener listener) Adds a listener that is called if the Task fails.
StorageTask<UploadTask.TaskSnapshot> | addOnFailureListener(Executor executor, OnFailureListener listener) Adds a listener that is called if the Task fails.
StorageTask<UploadTask.TaskSnapshot> | addOnPausedListener(Executor executor, OnPausedListener<? super TResult> listener) Adds a listener that is called when the Task becomes paused.
StorageTask<UploadTask.TaskSnapshot> | addOnPausedListener(Activity activity, OnPausedListener<? super TResult> listener) Adds a listener that is called when the Task becomes paused.
StorageTask<UploadTask.TaskSnapshot> | addOnPausedListener(OnPausedListener<? super TResult> listener) Adds a listener that is called when the Task becomes paused.
StorageTask<UploadTask.TaskSnapshot> | addOnProgressListener(Executor executor, OnProgressListener<? super TResult> listener) Adds a listener that is called periodically while the ControllableTask executes.
StorageTask<UploadTask.TaskSnapshot> | addOnProgressListener(OnProgressListener<? super TResult> listener) Adds a listener that is called periodically while the ControllableTask executes.
StorageTask<UploadTask.TaskSnapshot> | addOnProgressListener(Activity activity, OnProgressListener<? super TResult> listener) Adds a listener that is called periodically while the ControllableTask executes.
StorageTask<UploadTask.TaskSnapshot> | addOnSuccessListener(OnSuccessListener<? super TResult> listener) Adds a listener that is called if the Task completes successfully.
StorageTask<UploadTask.TaskSnapshot> | addOnSuccessListener(Activity activity, OnSuccessListener<? super TResult> listener) Adds a listener that is called if the Task completes successfully.
StorageTask<UploadTask.TaskSnapshot> | addOnSuccessListener(Executor executor, OnSuccessListener<? super TResult> listener) Adds a listener that is called if the Task completes successfully.
boolean | cancel() Attempts to cancel the task.
Exception | getException() Returns the exception that caused the Task to fail.
UploadTask.TaskSnapshot | getResult() Gets the result of the Task, if it has already completed.
<X extends Throwable> UploadTask.TaskSnapshot | getResult(Class<X> exceptionType) Gets the result of the Task, if it has already completed.
UploadTask.TaskSnapshot | getSnapshot()
boolean | isCanceled()
boolean | isComplete() Returns `true` if the Task is complete; `false` otherwise.
boolean | isInProgress()
boolean | isPaused()
boolean | isSuccessful() Returns `true` if the Task has completed successfully; `false` otherwise.
void | onCanceled()
void | onFailure()
void | onPaused()
void | onProgress()
void | onQueued()
void | onSuccess()
boolean | pause() Attempts to pause the task.
StorageTask<UploadTask.TaskSnapshot> | removeOnFailureListener(OnFailureListener listener) Removes a listener.
StorageTask<UploadTask.TaskSnapshot> | removeOnPausedListener(OnPausedListener<? super TResult> listener) Removes a listener.
StorageTask<UploadTask.TaskSnapshot> | removeOnProgressListener(OnProgressListener<? super TResult> listener) Removes a listener.
StorageTask<UploadTask.TaskSnapshot> | removeOnSuccessListener(OnSuccessListener<? super TResult> listener) Removes a listener.
boolean | resume() Attempts to resume a paused task.
From class com.google.firebase.storage.ControllableTask
abstract ControllableTask<UploadTask.TaskSnapshot> | addOnPausedListener(Activity activity, OnPausedListener<? super TState> listener) Adds a listener that is called when the Task becomes paused.
abstract ControllableTask<UploadTask.TaskSnapshot> | addOnPausedListener(OnPausedListener<? super TState> listener) Adds a listener that is called when the Task becomes paused.
abstract ControllableTask<UploadTask.TaskSnapshot> | addOnPausedListener(Executor executor, OnPausedListener<? super TState> listener) 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.
From class com.google.firebase.storage.CancellableTask
abstract CancellableTask<UploadTask.TaskSnapshot> | addOnProgressListener(OnProgressListener<? super TState> listener) Adds a listener that is called periodically while the ControllableTask executes.
abstract CancellableTask<UploadTask.TaskSnapshot> | addOnProgressListener(Executor executor, OnProgressListener<? super TState> listener) Adds a listener that is called periodically while the ControllableTask executes.
abstract CancellableTask<UploadTask.TaskSnapshot> | addOnProgressListener(Activity activity, OnProgressListener<? super TState> listener) Adds a listener that is called periodically while the ControllableTask executes.
abstract boolean | cancel() Attempts to cancel the task.
abstract boolean | isCanceled()
abstract boolean | isInProgress()
From class com.google.android.gms.tasks.Task
Task<UploadTask.TaskSnapshot> | addOnCompleteListener(OnCompleteListener<UploadTask.TaskSnapshot> listener) Adds a listener that is called when the Task completes.
Task<UploadTask.TaskSnapshot> | addOnCompleteListener(Activity activity, OnCompleteListener<UploadTask.TaskSnapshot> listener) Adds an Activity-scoped listener that is called when the Task completes.
Task<UploadTask.TaskSnapshot> | addOnCompleteListener(Executor executor, OnCompleteListener<UploadTask.TaskSnapshot> listener) Adds a listener that is called when the Task completes.
abstract Task<UploadTask.TaskSnapshot> | addOnFailureListener(Activity activity, OnFailureListener listener) Adds an Activity-scoped listener that is called if the Task fails.
abstract Task<UploadTask.TaskSnapshot> | addOnFailureListener(OnFailureListener listener) Adds a listener that is called if the Task fails.
abstract Task<UploadTask.TaskSnapshot> | addOnFailureListener(Executor executor, OnFailureListener listener) Adds a listener that is called if the Task fails.
abstract Task<UploadTask.TaskSnapshot> | addOnSuccessListener(Executor executor, OnSuccessListener<? super TResult> listener) Adds a listener that is called if the Task completes successfully.
abstract Task<UploadTask.TaskSnapshot> | addOnSuccessListener(OnSuccessListener<? super TResult> listener) Adds a listener that is called if the Task completes successfully.
abstract Task<UploadTask.TaskSnapshot> | addOnSuccessListener(Activity activity, OnSuccessListener<? super TResult> listener) Adds an Activity-scoped listener that is called if the Task completes successfully.
<TContinuationResult> Task<TContinuationResult> | continueWith(Continuation<UploadTask.TaskSnapshot, TContinuationResult> continuation) Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.
<TContinuationResult> Task<TContinuationResult> | continueWith(Executor executor, Continuation<UploadTask.TaskSnapshot, TContinuationResult> continuation) Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.
<TContinuationResult> Task<TContinuationResult> | continueWithTask(Continuation<UploadTask.TaskSnapshot, Task<TContinuationResult>> continuation) Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.
<TContinuationResult> Task<TContinuationResult> | continueWithTask(Executor executor, Continuation<UploadTask.TaskSnapshot, Task<TContinuationResult>> continuation) Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.
abstract Exception | getException() Returns the exception that caused the Task to fail.
abstract UploadTask.TaskSnapshot | getResult() Gets the result of the Task, if it has already completed.
abstract <X extends Throwable> UploadTask.TaskSnapshot | getResult(Class<X> exceptionType) Gets the result of the Task, if it has already completed.
abstract boolean | isComplete() Returns `true` if the Task is complete; `false` otherwise.
abstract boolean | isSuccessful() Returns `true` if the Task has completed successfully; `false` otherwise.
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Protected Methods

#### protected void onCanceled ()

#### protected void resetState ()

#### protected void schedule ()