PendingOperation
A reference to an ongoing asynchronous SDK operation, whose result is not yet known. It provides methods for checking whether the operation is complete, and whether it has succeeded. Additionally, it offers the ability to get its result either synchronously (blocking), or asynchronously via listeners.
If the operation succeeds, all completion and success listeners will be notified. The result will also be made available via the getResult method. If the operation fails, all completion and failure listeners will be notified, and the error will be made available via the getError method.
Properties
Functions
Link copied to clipboard
open fun addOnCompleteListener(@NonNull listener: OnCompleteListener<Result, Error>): PendingOperation<Result, Error>
Adds a listener that will be invoked after the operation completes.
Link copied to clipboard
open fun addOnFailureListener(@NonNull listener: OnFailureListener<Error>): PendingOperation<Result, Error>
Adds a listener that will be invoked after the operation fails.
Link copied to clipboard
open fun addOnSuccessListener(@NonNull listener: OnSuccessListener<Result>): PendingOperation<Result, Error>
Adds a listener that will be invoked after the operation succeeds.
Link copied to clipboard
Returns the result of the operation if it completed successfully.
Link copied to clipboard
Returns whether the operation has completed.
Link copied to clipboard
Returns whether the operation has succeeded.
Link copied to clipboard
Waits till the operation is complete.