Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#inhmethods)

# ConfirmationPrompt.Builder

*** ** * ** ***

` public static final class ConfirmationPrompt.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.security.ConfirmationPrompt.Builder |

<br />

*** ** * ** ***

A builder that collects arguments, to be shown on the system-provided confirmation prompt.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#Builder(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Creates a builder for the confirmation prompt. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/security/ConfirmationPrompt` | ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#build()() ` Creates a `https://developer.android.com/reference/android/security/ConfirmationPrompt` with the arguments supplied to this builder. |
| ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder` | ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#setExtraData(byte[])(byte[] extraData) ` Sets the extra data for the prompt. |
| ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder` | ` https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder#setPromptText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence promptText) ` Sets the prompt text for the prompt. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder (Context context)
```

Creates a builder for the confirmation prompt.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: the application context <br /> |

## Public methods

### build

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ConfirmationPrompt build ()
```

Creates a `https://developer.android.com/reference/android/security/ConfirmationPrompt` with the arguments supplied to this builder.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/security/ConfirmationPrompt` | a `https://developer.android.com/reference/android/security/ConfirmationPrompt` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if any of the required fields are not set. |

### setExtraData

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ConfirmationPrompt.Builder setExtraData (byte[] extraData)
```

Sets the extra data for the prompt.

<br />

| Parameters ||
|---|---|
| `extraData` | `byte`: data to include in the response data. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder` | the builder. <br /> |

### setPromptText

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ConfirmationPrompt.Builder setPromptText (CharSequence promptText)
```

Sets the prompt text for the prompt.

<br />

| Parameters ||
|---|---|
| `promptText` | `CharSequence`: the text to present in the prompt. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/security/ConfirmationPrompt.Builder` | the builder. <br /> |