Language

AccountManager.UpdateCredentials メソッド

定義

アカウントの新しいパスワードの入力をユーザーに求め、アカウントの保存された資格情報を更新します。

[Android.Runtime.Register("updateCredentials", "(Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetUpdateCredentials_Landroid_accounts_Account_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Activity_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_ACCOUNTS")]
public virtual Android.Accounts.IAccountManagerFuture? UpdateCredentials(Android.Accounts.Account? account, string? authTokenType, Android.OS.Bundle? options, Android.App.Activity? activity, Android.Accounts.IAccountManagerCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("updateCredentials", "(Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;)Landroid/accounts/AccountManagerFuture;", "GetUpdateCredentials_Landroid_accounts_Account_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Activity_Landroid_accounts_AccountManagerCallback_Landroid_os_Handler_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_ACCOUNTS")>]
abstract member UpdateCredentials : Android.Accounts.Account * string * Android.OS.Bundle * Android.App.Activity * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture
override this.UpdateCredentials : Android.Accounts.Account * string * Android.OS.Bundle * Android.App.Activity * Android.Accounts.IAccountManagerCallback * Android.OS.Handler -> Android.Accounts.IAccountManagerFuture

パラメーター

account
Account

資格情報を更新するアカウント

authTokenType
String

入力された資格情報では、この種類の認証トークンを作成できる必要があります (ただし、実際の認証トークンは返されません)。は null である可能性があります

options
Bundle

要求の認証子固有のオプション。null または空の場合があります

activity
Activity

ユーザーにパスワードの入力を求める新しい認証子定義サブアクティビティを起動するために使用する Activity コンテキスト。startActivity()を呼び出すためにのみ使用されます。null の場合、プロンプトは直接起動されませんが、代わりに必要な Intent が呼び出し元に返されます。

callback
IAccountManagerCallback

要求が完了したときに呼び出すコールバック。コールバックがない場合は null

handler
Handler

Handler コールバック スレッドの識別、メイン スレッドの場合は null

返品

アクティビティが指定され、アカウント資格情報が正常に更新された場合に、これらのフィールドを使用してバンドルに解決される AccountManagerFuture : <ul><li>#KEY_ACCOUNT_NAME - アカウントの名前 <li>#KEY_ACCOUNT_TYPE - アカウント </ul の種類>

        If no activity was specified, the returned Bundle contains
        <code data-dev-comment-type="c">#KEY_INTENT</code> with the <code data-dev-comment-type="c">Intent</code> needed to launch the
        password prompt. If an error occurred,
        <code data-dev-comment-type="c">AccountManagerFuture#getResult()</code> throws:
        &lt;ul&gt;
        &lt;li&gt; <code data-dev-comment-type="c">AuthenticatorException</code> if the authenticator failed to respond
        &lt;li&gt; <code data-dev-comment-type="c">OperationCanceledException</code> if the operation was canceled for
             any reason, including the user canceling the password prompt
        &lt;li&gt; <code data-dev-comment-type="c">IOException</code> if the authenticator experienced an I/O problem
             verifying the password, usually because of network trouble
        &lt;/ul&gt;
属性

注釈

アカウントの新しいパスワードの入力をユーザーに求め、アカウントの保存された資格情報を更新します。 通常、これは認証トークンのフェッチ中にサーバーが資格情報を拒否したときに自動的に発生しますが、正しい資格情報が格納されていることを確認するために直接呼び出すことができます。

このメソッドは任意のスレッドから呼び出される可能性がありますが、返される AccountManagerFuture はメイン スレッドで使用しないでください。

<b>NOTE:</b> API レベル 22 以前で動作するようにアプリをターゲットとする場合は、それらのプラットフォームにMANAGE_ACCOUNTSアクセス許可が必要です。 API レベル 22 のこの関数のドキュメントを参照してください。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象