# AlertCallbackDelegate

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

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 5)
public interface AlertCallbackDelegate
```

<br />

*** ** * ** ***

A host-side interface for reporting cancel events to clients.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/AlertCallbackDelegate#sendCancel(int,androidx.car.app.OnDoneCallback)(int reason, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback)` Notifies that a cancel event happened with given `reason`. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/AlertCallbackDelegate#sendDismiss(androidx.car.app.OnDoneCallback)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback)` Notifies that a dismiss event happened. |

## Public methods

### sendCancel

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

```
abstract void sendCancel(int reason, @NonNull OnDoneCallback callback)
```

Notifies that a cancel event happened with given `reason`.

| Parameters |
|---|---|
| `int reason` | the `https://developer.android.com/reference/androidx/car/app/model/AlertCallback.Reason` for which the alert was cancelled |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback` | the `https://developer.android.com/reference/androidx/car/app/OnDoneCallback` to trigger when the client finishes handling the event |

### sendDismiss

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

```
abstract void sendDismiss(@NonNull OnDoneCallback callback)
```

Notifies that a dismiss event happened.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback` | the `https://developer.android.com/reference/androidx/car/app/OnDoneCallback` to trigger when the client finishes handling the event |