Language

CredentialManager.GetCredential メソッド

定義

オーバーロード

Name 説明
GetCredential(Context, GetCredentialRequest, CancellationSignal, IExecutor, IOutcomeReceiver)

ユーザーからアプリの資格情報を取得するために必要なフローを起動します。

GetCredential(Context, PrepareGetCredentialResponse+PendingGetCredentialHandle, CancellationSignal, IExecutor, IOutcomeReceiver)

残りのフローを起動して、指定された保留中のGetCredentialHandle に対応するプリフェッチ作業が完了した後、ユーザーからアプリ資格情報を取得します。

GetCredential(Context, GetCredentialRequest, CancellationSignal, IExecutor, IOutcomeReceiver)

ユーザーからアプリの資格情報を取得するために必要なフローを起動します。

[Android.Runtime.Register("getCredential", "(Landroid/content/Context;Landroid/credentials/GetCredentialRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void GetCredential(Android.Content.Context context, Android.Credentials.GetCredentialRequest request, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getCredential", "(Landroid/content/Context;Landroid/credentials/GetCredentialRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.GetCredential : Android.Content.Context * Android.Credentials.GetCredentialRequest * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

パラメーター

context
Context

必要な UI を起動するために使用されるコンテキスト。アクティビティ コンテキストを使用して、同じタスク スタック内で UI が起動されることを確認する

request
GetCredentialRequest

ユーザーから取得する資格情報の種類を指定する要求

cancellationSignal
CancellationSignal

この呼び出しをキャンセルできるオプションのシグナル

executor
IExecutor

コールバックはこれに対して行われます Executor

callback
IOutcomeReceiver

要求が成功または失敗したときに呼び出されるコールバック

属性

注釈

ユーザーからアプリの資格情報を取得するために必要なフローを起動します。

この実行では、UI フローを起動して、資格情報の使用に対するユーザーの同意を収集したり、複数の資格情報が存在する場合にピッカーを表示したりできます。呼び出し元 (ブラウザーなど) は、必要に応じて、アプリに代わって資格情報を取得できるように、独自とは異なるアプリの GetCredentialRequest に配信元を設定できます。 この機能を使用するには、追加のアクセス許可 CREDENTIAL_MANAGER_SET_ORIGIN が必要です

Javaドキュメント。

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

適用対象

GetCredential(Context, PrepareGetCredentialResponse+PendingGetCredentialHandle, CancellationSignal, IExecutor, IOutcomeReceiver)

残りのフローを起動して、指定された保留中のGetCredentialHandle に対応するプリフェッチ作業が完了した後、ユーザーからアプリ資格情報を取得します。

[Android.Runtime.Register("getCredential", "(Landroid/content/Context;Landroid/credentials/PrepareGetCredentialResponse$PendingGetCredentialHandle;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void GetCredential(Android.Content.Context context, Android.Credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle pendingGetCredentialHandle, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getCredential", "(Landroid/content/Context;Landroid/credentials/PrepareGetCredentialResponse$PendingGetCredentialHandle;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.GetCredential : Android.Content.Context * Android.Credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

パラメーター

context
Context

必要な UI を起動するために使用されるコンテキスト。アクティビティ コンテキストを使用して、同じタスク スタック内で UI が起動されることを確認します。 この値は null にすることはできません。

pendingGetCredentialHandle
PrepareGetCredentialResponse.PendingGetCredentialHandle

再開する保留中の操作を表すハンドル。 この値は null にすることはできません。

cancellationSignal
CancellationSignal

この呼び出しをキャンセルできるオプションのシグナル。 この値は null である可能性があります。

executor
IExecutor

コールバックはこの Executor コールバックで行われ、リスナー イベントはこの Executor を介してディスパッチされ、使用されるスレッドを簡単に制御できます。 アプリケーションのメイン スレッドを介してイベントをディスパッチするには、Context.getMainExecutor() を使用できます。 それ以外の場合は、適切なスレッドにディスパッチする Executor を指定します。 この値は null にすることはできません。

callback
IOutcomeReceiver

要求が成功または失敗したときに呼び出されるコールバック。 この値は null にすることはできません。

属性

注釈

残りのフローを起動して、指定された保留中のGetCredentialHandle に対応するプリフェッチ作業が完了した後、ユーザーからアプリ資格情報を取得します。

この実行では、UI フローを起動して、資格情報の使用に対するユーザーの同意を収集したり、複数の資格情報が存在する場合にピッカーを表示したりできます。

prepareGetCredential(GetCredentialRequest,CancellationSignal,Executor,OutcomeReceiver) API を使用して要求を開始した後、この API を使用して完全な資格情報取得操作を完了します。

android.credentials.CredentialManager.getCredentialの Android リファレンス。

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

適用対象