RemoteEntry


public final class RemoteEntry


An entry on the selector, denoting that the credential request will be completed on a remote device.

Once this entry is selected, the corresponding pendingIntent will be invoked. The provider can then show any activity they wish to while establishing a connection with a different device and retrieving a credential. Before finishing the activity, provider must set the final androidx.credentials.GetCredentialResponse through the PendingIntentHandler.setGetCredentialResponse helper API, or a androidx.credentials.CreateCredentialResponse through the PendingIntentHandler.setCreateCredentialResponse helper API depending on whether it is a get or create flow.

See android.service.credentials.BeginGetCredentialResponse for usage details.

Summary

Nested types

public final class RemoteEntry.Builder

A builder for RemoteEntry

Public constructors

constructs an instance of RemoteEntry

Public methods

static final RemoteEntry

Converts a framework android.service.credentials.RemoteEntry class to a Jetpack RemoteEntry class

final @NonNull PendingIntent

the PendingIntent that will get invoked when the user selects this authentication entry on the UI, must be created with flag PendingIntent.FLAG_MUTABLE so that the system can add the complete request to the extras of the associated intent

Public constructors

RemoteEntry

Added in 1.2.0
public RemoteEntry(@NonNull PendingIntent pendingIntent)

constructs an instance of RemoteEntry

Parameters
@NonNull PendingIntent pendingIntent

the PendingIntent that will get invoked when the user selects this authentication entry on the UI, must be created with flag PendingIntent.FLAG_MUTABLE so that the system can add the complete request to the extras of the associated intent

Public methods

fromRemoteEntry

Added in 1.3.0-alpha03
public static final RemoteEntry fromRemoteEntry(@NonNull RemoteEntry remoteEntry)

Converts a framework android.service.credentials.RemoteEntry class to a Jetpack RemoteEntry class

Note that this API is not needed in a general credential creation/retrieval flow that is implemented using this jetpack library, where you are only required to construct an instance of RemoteEntry to populate the BeginGetCredentialResponse or BeginCreateCredentialResponse.

Parameters
@NonNull RemoteEntry remoteEntry

the instance of framework action class to be converted

getPendingIntent

Added in 1.2.0
public final @NonNull PendingIntent getPendingIntent()

the PendingIntent that will get invoked when the user selects this authentication entry on the UI, must be created with flag PendingIntent.FLAG_MUTABLE so that the system can add the complete request to the extras of the associated intent