AccountManager.PeekAuthToken(Account, String) Method

Definition

Gets an auth token from the AccountManager's cache.

[Android.Runtime.Register("peekAuthToken", "(Landroid/accounts/Account;Ljava/lang/String;)Ljava/lang/String;", "GetPeekAuthToken_Landroid_accounts_Account_Ljava_lang_String_Handler")]
[Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")]
public virtual string? PeekAuthToken (Android.Accounts.Account? account, string? authTokenType);
[<Android.Runtime.Register("peekAuthToken", "(Landroid/accounts/Account;Ljava/lang/String;)Ljava/lang/String;", "GetPeekAuthToken_Landroid_accounts_Account_Ljava_lang_String_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")>]
abstract member PeekAuthToken : Android.Accounts.Account * string -> string
override this.PeekAuthToken : Android.Accounts.Account * string -> string

Parameters

account
Account

The account for which an auth token is to be fetched. Cannot be null.

authTokenType
String

The type of auth token to fetch. Cannot be null.

Returns

String

The cached auth token for this account and type, or null if no auth token is cached, the account does not exist, or the user is locked

Attributes

Remarks

Java documentation for android.accounts.AccountManager.peekAuthToken(android.accounts.Account, java.lang.String).

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