Summary: Ctors | Methods | Inherited Methods | [Expand All]
public abstract class

# ResultCallbacks

extends Object
implements ResultCallback<R extends Result>

java.lang.Object
↳ | com.google.android.gms.common.api.ResultCallbacks<R extends com.google.android.gms.common.api.Result>

Known Direct Subclasses ResolvingResultCallbacks<R extends Result>
ResolvingResultCallbacks<R extends Result> | `ResultCallbacks` which automatically start resolutions for failures.

## Class Overview

Callbacks for receiving a `Result` from a `PendingResult` as an asynchronous callback. Contains separate callbacks for success and failure.

These methods are called on the main thread, unless overridden by `setHandler(Handler)`.

## Summary

Public Constructors
| ResultCallbacks()

Public Methods
abstract void | onFailure(Status result) Called when the `Result` is ready and a failure occurred.
abstract void | onSuccess(R result) Called when the `Result` is ready and was successful.

[Expand] Inherited Methods
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()
From interface com.google.android.gms.common.api.ResultCallback
abstract void | onResult(R result) Called when the `Result` is ready.

## Public Constructors

#### public ResultCallbacks ()

## Public Methods

#### public abstract void onFailure (Status result)

Called when the `Result` is ready and a failure occurred.

##### Parameters

result | Status resulting from the API call. Guaranteed to be non-null and unsuccessful.

#### public abstract void onSuccess (R result)

Called when the `Result` is ready and was successful.

It is the responsibility of the callback to release any resources associated with the result if `onSuccess(R)` is called. Some result types may implement `Releasable`, in which case `release()` should be used to free the associated resources. If a failure occurs the result will be released automatically.

##### Parameters

result | The result from the API call. Never null.