Android.Accounts.AccountManager.SetAuthToken Method
Adds an auth token to the AccountManager cache for an account.

Syntax

[Android.Runtime.Register("setAuthToken", "(Landroid/accounts/Account;Ljava/lang/String;Ljava/lang/String;)V", "GetSetAuthToken_Landroid_accounts_Account_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual void SetAuthToken (Account account, string authTokenType, string authToken)

Parameters

account
The account to set an auth token for
authTokenType
The type of the auth token, see {#getAuthToken}
authToken
The auth token to add to the cache

Remarks

Adds an auth token to the AccountManager cache for an account. If the account does not exist then this call has no effect. Replaces any previous auth token for this account and auth token type. Intended for use by the authenticator, not directly by applications.

It is safe to call this method from the main thread.

This method requires the caller to hold the permission NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#AUTHENTICATE_ACCOUNTS and to have the same UID as the account's authenticator.

[Android Documentation]

Requirements

Namespace: Android.Accounts
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 5