Condividi tramite


IAccountManagerFuture.GetResult(Int64, TimeUnit) Method

Definition

Accessor for the future result the AccountManagerFuture represents.

[Android.Runtime.Register("getResult", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGetResult_JLjava_util_concurrent_TimeUnit_Handler:Android.Accounts.IAccountManagerFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? GetResult (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("getResult", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGetResult_JLjava_util_concurrent_TimeUnit_Handler:Android.Accounts.IAccountManagerFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetResult : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object

Parameters

timeout
Int64

the maximum time to wait

unit
TimeUnit

the time unit of the timeout argument. This must not be null.

Returns

the actual result

Attributes

Exceptions

if the request was canceled for any reason

if there was an error communicating with the authenticator or if the authenticator returned an invalid response

if the authenticator returned an error response that indicates that it encountered an IOException while communicating with the authentication server

Remarks

Accessor for the future result the AccountManagerFuture represents. This call will block until the result is available. In order to check if the result is available without blocking, one may call #isDone() and #isCancelled(). If the request that generated this result fails or is canceled then an exception will be thrown rather than the call returning normally. If a timeout is specified then the request will automatically be canceled if it does not complete in that amount of time.

Java documentation for android.accounts.AccountManagerFuture.getResult(long, java.util.concurrent.TimeUnit).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to