CredentialManager.PrepareGetCredential 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
準備進行取得證件的行動。
[Android.Runtime.Register("prepareGetCredential", "(Landroid/credentials/GetCredentialRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void PrepareGetCredential(Android.Credentials.GetCredentialRequest request, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("prepareGetCredential", "(Landroid/credentials/GetCredentialRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.PrepareGetCredential : Android.Credentials.GetCredentialRequest * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
參數
- request
- GetCredentialRequest
指定使用者要取得的憑證類型請求
- cancellationSignal
- CancellationSignal
一個可選的訊號,允許取消此通話
- executor
- IExecutor
回試將在此進行 Executor
- callback
- IOutcomeReceiver
當請求成功或失敗時所呼叫的回調
- 屬性
備註
準備進行取得證件的行動。 回傳一個 PrepareGetCredentialResponse 可以啟動憑證檢索 UI 流程,請求你應用程式的使用者憑證的 UI 流程。
這個 API 不會呼叫任何 UI。 它只是做準備工作,讓你之後能透過 API 啟動剩餘的取得憑證操作(涉及 UI), #getCredential(Context, PrepareGetCredentialResponse.PendingGetCredentialHandle, CancellationSignal, Executor, OutcomeReceiver) 這比一次呼叫執行整個操作的 API 延遲更低 #getCredential(Context, GetCredentialRequest, CancellationSignal, Executor, OutcomeReceiver) 。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。