View.SetPendingCredentialRequest Method

Definition

Sets a CredentialManager request to retrieve credentials, when the user focuses on this given view.

[Android.Runtime.Register("setPendingCredentialRequest", "(Landroid/credentials/GetCredentialRequest;Landroid/os/OutcomeReceiver;)V", "GetSetPendingCredentialRequest_Landroid_credentials_GetCredentialRequest_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)]
public virtual void SetPendingCredentialRequest (Android.Credentials.GetCredentialRequest request, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("setPendingCredentialRequest", "(Landroid/credentials/GetCredentialRequest;Landroid/os/OutcomeReceiver;)V", "GetSetPendingCredentialRequest_Landroid_credentials_GetCredentialRequest_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)>]
abstract member SetPendingCredentialRequest : Android.Credentials.GetCredentialRequest * Android.OS.IOutcomeReceiver -> unit
override this.SetPendingCredentialRequest : Android.Credentials.GetCredentialRequest * Android.OS.IOutcomeReceiver -> unit

Parameters

request
GetCredentialRequest

the request to be fired when this view is entered

callback
IOutcomeReceiver

to be invoked when either a response or an exception needs to be propagated for the given view

Attributes

Remarks

Sets a CredentialManager request to retrieve credentials, when the user focuses on this given view.

When this view is focused, the given request will be fired to CredentialManager, which will fetch content from all android.service.credentials.CredentialProviderService services on the device, and then display credential options to the user on a relevant UI (dropdown, keyboard suggestions etc.).

When the user selects a credential, the final GetCredentialResponse will be propagated to the given callback. Developers are expected to handle the response programmatically and perform a relevant action, e.g. signing in the user.

For details on how to build a Credential Manager request, please see GetCredentialRequest.

This API should be called at any point before the user focuses on the view, e.g. during onCreate of an Activity.

Java documentation for android.view.View.setPendingCredentialRequest(android.credentials.GetCredentialRequest, android.os.OutcomeReceiver<android.credentials.GetCredentialResponse, android.credentials.GetCredentialException>).

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