Sdílet prostřednictvím


AbstractAccountAuthenticator.FinishSession Method

Definition

Finishes the session started by #startAddAccountSession or #startUpdateCredentials by installing the account to device with AccountManager, or updating the local credentials.

[Android.Runtime.Register("finishSession", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetFinishSession_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)]
public virtual Android.OS.Bundle? FinishSession (Android.Accounts.AccountAuthenticatorResponse? response, string? accountType, Android.OS.Bundle? sessionBundle);
[<Android.Runtime.Register("finishSession", "(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;", "GetFinishSession_Landroid_accounts_AccountAuthenticatorResponse_Ljava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)>]
abstract member FinishSession : Android.Accounts.AccountAuthenticatorResponse * string * Android.OS.Bundle -> Android.OS.Bundle
override this.FinishSession : Android.Accounts.AccountAuthenticatorResponse * 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

sessionBundle
Bundle

a bundle of session data created by #startAddAccountSession used for adding account to device, or by #startUpdateCredentialsSession used for updating local credentials.

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 local credentials were updated, and optional AccountManager#KEY_ACCOUNT_STATUS_TOKEN for checking the status of the account later, or <li>AccountManager#KEY_ERROR_CODE and AccountManager#KEY_ERROR_MESSAGE to indicate an error </ul>

Attributes

Remarks

Finishes the session started by #startAddAccountSession or #startUpdateCredentials by installing the account to device with AccountManager, or updating the local credentials. File I/O may be performed in this call.

Note: when overriding this method, #startAddAccountSession and #startUpdateCredentialsSession should be overridden too.

Java documentation for android.accounts.AbstractAccountAuthenticator.finishSession(android.accounts.AccountAuthenticatorResponse, 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