AbstractAccountAuthenticator.FinishSession 方法

定义

通过使用 AccountManager 将帐户安装到设备或更新本地凭据,完成 #startAddAccountSession 或 #startUpdateCredentials 启动的会话。

[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

参数

response
AccountAuthenticatorResponse

将结果发送回 AccountManager,永远不会为 null

accountType
String

要进行身份验证的帐户类型永远不会为 null

sessionBundle
Bundle

一组会话数据,用于 #startAddAccountSession 将帐户添加到设备,或 #startUpdateCredentialsSession 用于更新本地凭据。

返回

如果通过响应返回结果,则为捆绑结果或 null。 结果将包含:<ul><li、liAccountManager#KEY_ACCOUNT_NAMEAccountManager#KEY_INTENT>> 和AccountManager#KEY_ACCOUNT_TYPE已添加的帐户或<已更新本地凭据的帐户,<以及稍后检查帐户状态(可选AccountManager#KEY_ACCOUNT_STATUS_TOKEN)或 liAccountManager#KEY_ERROR_CODE>,并AccountManager#KEY_ERROR_MESSAGE指示错误 </ul>

属性

注解

通过使用 AccountManager 将帐户安装到设备或更新本地凭据,完成 #startAddAccountSession 或 #startUpdateCredentials 启动的会话。 可以在此调用中执行文件 I/O。

注意:重写此方法时, #startAddAccountSession#startUpdateCredentialsSession 还应重写此方法。

适用于 . 的 android.accounts.AbstractAccountAuthenticator.finishSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, android.os.Bundle)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于