Android.Accounts.AccountManager.SetUserData Method
Sets one userdata key for an account.

Syntax

[Android.Runtime.Register("setUserData", "(Landroid/accounts/Account;Ljava/lang/String;Ljava/lang/String;)V", "GetSetUserData_Landroid_accounts_Account_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual void SetUserData (Account account, string key, string value)

Parameters

account
The account to set the userdata for
key
The userdata key to set. Must not be null
value
The value to set, null to clear this userdata key

Remarks

Sets one userdata key for an account. Intended by use for the authenticator to stash state for itself, not directly by applications. The meaning of the keys and values is up to the authenticator.

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