AbstractAccountAuthenticator.AddAccount Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an account of the specified accountType.
[Android.Runtime.Register("addAccount", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetAddAccount_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_Bundle_Handler")]
public abstract Android.OS.Bundle? AddAccount (Android.Accounts.AccountAuthenticatorResponse? response, string? accountType, string? authTokenType, string[]? requiredFeatures, Android.OS.Bundle? options);
[<Android.Runtime.Register("addAccount", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetAddAccount_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_Bundle_Handler")>]
abstract member AddAccount : Android.Accounts.AccountAuthenticatorResponse * string * string * string[] * Android.OS.Bundle -> Android.OS.Bundle
Parameters
- response
- AccountAuthenticatorResponse
to send the result back to the AccountManager, will never be null
- accountType
- String
the type of account to add, will never be null
- authTokenType
- String
the type of auth token to retrieve after adding the account, may be null
- requiredFeatures
- String[]
a String array of authenticator-specific features that the added account must support, may be null
- options
- Bundle
a Bundle of authenticator-specific options. It always contains
AccountManager#KEY_CALLER_PID
and AccountManager#KEY_CALLER_UID
fields which will let authenticator know the identity of the caller.
Returns
a Bundle result or null if the result is to be returned via the response. The result
will contain either:
<ul>
<li> AccountManager#KEY_INTENT
, or
<li> AccountManager#KEY_ACCOUNT_NAME
and AccountManager#KEY_ACCOUNT_TYPE
of
the account that was added, or
<li> AccountManager#KEY_ERROR_CODE
and AccountManager#KEY_ERROR_MESSAGE
to
indicate an error
</ul>
- Attributes
Exceptions
if the authenticator could not honor the request due to a network error
Remarks
Adds an account of the specified accountType.
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.