AccountManager.RenameAccount(Account, String, IAccountManagerCallback, Handler) Method

Definition

Rename the specified Account.

[Android.Runtime.Register("renameAccount", "(Landroid/accounts/Account;Ljava/lang/String;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetRenameAccount_Landroid_accounts_Account_Ljava_lang_String_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")]
[Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")]
public virtual Android.Accounts.IAccountManagerFuture? RenameAccount (Android.Accounts.Account? account, string? newName, Android.Accounts.IAccountManagerCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("renameAccount", "(Landroid/accounts/Account;Ljava/lang/String;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetRenameAccount_Landroid_accounts_Account_Ljava_lang_String_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.AUTHENTICATE_ACCOUNTS")>]
abstract member RenameAccount : Android.Accounts.Account * string * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture
override this.RenameAccount : Android.Accounts.Account * string * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture

Parameters

account
Account

The Account to rename

newName
String

String name to be associated with the account.

callback
IAccountManagerCallback

Callback to invoke when the request completes, null for no callback

handler
Handler

Handler identifying the callback thread, null for the main thread

Returns

IAccountManagerFuture

An AccountManagerFuture which resolves to the Account after the name change. If successful the account's name will be the specified new name.

Attributes

Remarks

Java documentation for android.accounts.AccountManager.renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler).

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