com.google.android.gms.common.api.PendingResult<R extends com.google.android.gms.common.api.Result> |
Known Indirect Subclasses
|
Represents a pending result from calling an API method in Google Play services. The final result
object from a PendingResult
After the result has been retrieved using
await()
, or await(long, TimeUnit)
, or
ResultCallback
to
setResultCallback(ResultCallback
.
await()
or delivered to the
result callback, it is an error to attempt to retrieve the result again. It is the responsibility
of the caller or callback receiver to release any resources associated with the returned result.
Some result types may implement Releasable
, in which case release()
should be used to free the associated resources.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Blocks until the task is completed.
| |||||||||||
Blocks until the task is completed or has timed out waiting for the result.
| |||||||||||
Requests that the PendingResult be canceled.
| |||||||||||
Set the callback here if you want the result to be delivered via a callback when the result
is ready or has timed out waiting for the result.
| |||||||||||
Set the callback here if you want the result to be delivered via a callback when the
result is ready.
|
Blocks until the task is completed. This is not allowed on the UI thread. The returned
result object can have an additional failure mode of INTERRUPTED
.
Blocks until the task is completed or has timed out waiting for the result. This is not
allowed on the UI thread. The returned result object can have an additional failure mode of
either INTERRUPTED
or TIMEOUT
.
Requests that the PendingResult be canceled. If the result is available, but not consumed it will be released. If the result is set after cancelation was requested it is immediately released.
onResult(Result)
will never be called, await()
will return
a failed result with CANCELED
.
Set the callback here if you want the result to be delivered via a callback when the result
is ready or has timed out waiting for the result. The returned result object can have an
additional failure mode of TIMEOUT
.
Set the callback here if you want the result to be delivered via a callback when the result is ready.