# AuthenticationRequest.Credential.Builder

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/AuthenticationRequest.kt+class:androidx.biometric.AuthenticationRequest.Credential.Builder) Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

*** ** * ** ***


```
public final class AuthenticationRequest.Credential.Builder
```

<br />

*** ** * ** ***

Builder used to create an instance of `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential`.

**Note for Kotlin users:** Prefer using the `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Companion#credentialRequest(kotlin.String,kotlin.Function1)` function to construct `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder#Builder(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html title)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential` | `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder#build()()` Construct an instance of `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder` | `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder#setContent(androidx.biometric.AuthenticationRequest.BodyContent)(https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.BodyContent content)` The optional `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.BodyContent` of the prompt. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder` | `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder#setCryptoObject(androidx.biometric.BiometricPrompt.CryptoObject)(https://developer.android.com/reference/androidx/biometric/BiometricPrompt.CryptoObject cryptoObject)` An optional cryptographic object to be associated with the authentication. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder` | `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential.Builder#setSubtitle(kotlin.String)(https://developer.android.com/reference/java/lang/String.html subtitle)` The optional subtitle of the prompt. |

## Public constructors

### Builder

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public Builder(@NonNull String title)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html title` | The title of the prompt. |

## Public methods

### build

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public final @NonNull AuthenticationRequest.Credential build()
```

Construct an instance of `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.Credential`.

### setContent

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public final @NonNull AuthenticationRequest.Credential.Builder setContent(AuthenticationRequest.BodyContent content)
```

The optional `https://developer.android.com/reference/androidx/biometric/AuthenticationRequest.BodyContent` of the prompt.

### setCryptoObject

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public final @NonNull AuthenticationRequest.Credential.Builder setCryptoObject(BiometricPrompt.CryptoObject cryptoObject)
```

An optional cryptographic object to be associated with the authentication.

### setSubtitle

Added in [1.4.0-beta01](https://developer.android.com/jetpack/androidx/releases/biometric#1.4.0-beta01)

```
public final @NonNull AuthenticationRequest.Credential.Builder setSubtitle(String subtitle)
```

The optional subtitle of the prompt.