# 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
public 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 methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyDown(int,androidx.car.app.OnDoneCallback)(int key, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback)` Send the key down event to the client. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyLongPress(int,androidx.car.app.OnDoneCallback)(int key, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback)` Send the key long press event to the client. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate#sendKeyUp(int,androidx.car.app.OnDoneCallback)(int key, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback)` Send the key up event to the client. |

## Public methods

### sendKeyDown

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

```
abstract void sendKeyDown(int key, @NonNull OnDoneCallback callback)
```

Send the key down event to the client.

| Parameters |
|---|---|
| `int key` | The code for the key that was pressed allowed by `https://developer.android.com/reference/androidx/car/app/dialer/TelephoneKeypadTemplate.KeypadKey`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback` | 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)

```
abstract void sendKeyLongPress(int key, @NonNull OnDoneCallback callback)
```

Send the key long press event to the client.

| Parameters |
|---|---|
| `int key` | The code for the key that was pressed allowed by `https://developer.android.com/reference/androidx/car/app/dialer/TelephoneKeypadTemplate.KeypadKey`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback` | 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)

```
abstract void sendKeyUp(int key, @NonNull OnDoneCallback callback)
```

Send the key up event to the client.

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