# AuthenticationAction.Builder

# AuthenticationAction.Builder

Artifact:[androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials)  
[View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/AuthenticationAction.kt+class:androidx.credentials.provider.AuthenticationAction.Builder)  
Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/credentials/provider/AuthenticationAction.Builder "View this page in Java")

<br />

```
class AuthenticationAction.Builder
```

<br />

*** ** * ** ***

A builder for[AuthenticationAction](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction)

## Summary

|                                                                                                                                                                                     ### Public constructors                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction.Builder#Builder(kotlin.CharSequence,android.app.PendingIntent))`(title: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`, pendingIntent: `[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)`)` |

|                                                   ### Public functions                                                    |
|---------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AuthenticationAction](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction) | [build](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction.Builder#build())`()` Builds an instance of[AuthenticationAction](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction) |

## Public constructors

### Builder

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)  

```
Builder(title: CharSequence, pendingIntent: PendingIntent)
```  

|                                                Parameters                                                |
|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `title: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)  | the title to be displayed with this authentication action entry                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `pendingIntent: `[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html) | the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag[PendingIntent.FLAG_MUTABLE](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE())to allow the Android system to attach the final request, and NOT with flag[PendingIntent.FLAG_ONE_SHOT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT())as it can be invoked multiple times |

## Public functions

### build

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)  

```
fun build(): AuthenticationAction
```

Builds an instance of[AuthenticationAction](https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction)