# PinSignInMethod

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/signin/PinSignInMethod.java+class:androidx.car.app.model.signin.PinSignInMethod) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/car/app/model/signin/PinSignInMethod "View this page in Java")


```
@RequiresCarApi(value = 2)
@CarProtocol
class PinSignInMethod : SignInTemplate.SignInMethod
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/SignInTemplate.SignInMethod` that presents a PIN or activation code that the user can use to sign-in.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod#PinSignInMethod(java.lang.CharSequence)(pinCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod` instance. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod#getPinCode()()` Returns the PIN or activation code to present to the user. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod#hashCode()()` |

## Public constructors

### PinSignInMethod

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
PinSignInMethod(pinCode: CharSequence)
```

Returns a `https://developer.android.com/reference/kotlin/androidx/car/app/model/signin/PinSignInMethod` instance.

#### Requirements

The provided pin must be no more than 12 characters long. To facilitate typing this code, it is recommended restricting the string to a limited set (for example, numbers, upper-case letters, hexadecimal, etc.).

Spans are not supported in the pin and will be ignored.

| Parameters |
|---|---|
| `pinCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | the PIN to display is empty. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `pin` is empty or longer than 12 characters. |
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `pin` is `null` |

## Public functions

### equals

```
fun equals(other: Any!): Boolean
```

### getPinCode

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
fun getPinCode(): CarText
```

Returns the PIN or activation code to present to the user.

### hashCode

```
fun hashCode(): Int
```