# TelephoneKeypadCallbackDelegate

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/dialer/TelephoneKeypadCallbackDelegate.java+class:androidx.car.app.dialer.TelephoneKeypadCallbackDelegate) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.8.0)

*** ** * ** ***


```
@CarProtocol
@ExperimentalCarApi
interface TelephoneKeypadCallbackDelegate
```

<br />

*** ** * ** ***

A host-side interface for reporting keypad key events to clients. This delegate exists to abstract away the success/failure calls caused by the app, host, or android OS (due to the ipc transaction) through a more structured interface. All IPC events must be executed on the main thread.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyDown(int,androidx.car.app.OnDoneCallback)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback)` Send the key down event to the client. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyLongPress(int,androidx.car.app.OnDoneCallback)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback)` Send the key long press event to the client. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyUp(int,androidx.car.app.OnDoneCallback)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback)` Send the key up event to the client. |

## Public functions

### sendKeyDown

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

```
fun sendKeyDown(key: Int, callback: OnDoneCallback): Unit
```

Send the key down event to the client.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The code for the key that was pressed allowed by `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.KeypadKey`. |
| `callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback` | The callback to be notified when the operation is complete. The callback will be executed on the main thread. |

### sendKeyLongPress

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

```
fun sendKeyLongPress(key: Int, callback: OnDoneCallback): Unit
```

Send the key long press event to the client.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The code for the key that was pressed allowed by `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.KeypadKey`. |
| `callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback` | The callback to be notified when the operation is complete. The callback will be executed on the main thread. |

### sendKeyUp

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

```
fun sendKeyUp(key: Int, callback: OnDoneCallback): Unit
```

Send the key up event to the client.

| Parameters |
|---|---|
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The code for the key that was pressed allowed by `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.KeypadKey`. |
| `callback: https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback` | The callback to be notified when the operation is complete. The callback will be executed on the main thread. |