Share via


AbstractAccountAuthenticator.StartAddAccountSession Method

Definition

Starts the add account session to authenticate user to an account of the specified accountType.

[Android.Runtime.Register("startAddAccountSession", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetStartAddAccountSession_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)]
public virtual Android.OS.Bundle? StartAddAccountSession (Android.Accounts.AccountAuthenticatorResponse? response, string? accountType, string? authTokenType, string[]? requiredFeatures, Android.OS.Bundle? options);
[<Android.Runtime.Register("startAddAccountSession", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetStartAddAccountSession_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)>]
abstract member StartAddAccountSession : Android.Accounts.AccountAuthenticatorResponse * string * string * string[] * Android.OS.Bundle -> Android.OS.Bundle
override this.StartAddAccountSession : 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 authenticate with, will never be null

authTokenType
String

the type of auth token to retrieve after authenticating with the account, may be null

requiredFeatures
String[]

a String array of authenticator-specific features that the account authenticated with must support, may be null

options
Bundle

a Bundle of authenticator-specific options, may be null

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_SESSION_BUNDLE for adding the account to device later, and if account is authenticated, optional AccountManager#KEY_PASSWORD and AccountManager#KEY_ACCOUNT_STATUS_TOKEN for checking the status of the account, or <li>AccountManager#KEY_ERROR_CODE and AccountManager#KEY_ERROR_MESSAGE to indicate an error </ul>

Attributes

Remarks

Starts the add account session to authenticate user to an account of the specified accountType. No file I/O should be performed in this call. Account should be added to device only when #finishSession is called after this.

Note: when overriding this method, #finishSession should be overridden too.

Java documentation for android.accounts.AbstractAccountAuthenticator.startAddAccountSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle).

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