# SearchCallbackDelegate

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

*** ** * ** ***


```
@CarProtocol
public interface SearchCallbackDelegate
```

<br />

*** ** * ** ***

A host-side delegate for sending `https://developer.android.com/reference/androidx/car/app/model/SearchTemplate.SearchCallback` events to the car app.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/SearchCallbackDelegate#sendSearchSubmitted(java.lang.String,androidx.car.app.OnDoneCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html searchText, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback )` Notifies that the user has submitted the search. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/SearchCallbackDelegate#sendSearchTextChanged(java.lang.String,androidx.car.app.OnDoneCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html searchText, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback )` Notifies that the search text has changed. |

## Public methods

### sendSearchSubmitted

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

```
abstract void sendSearchSubmitted(
    @NonNull String searchText,
    @NonNull OnDoneCallback callback
)
```

Notifies that the user has submitted the search.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html searchText` | the search text that was submitted |
| `@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 |

### sendSearchTextChanged

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

```
abstract void sendSearchTextChanged(
    @NonNull String searchText,
    @NonNull OnDoneCallback callback
)
```

Notifies that the search text has changed.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html searchText` | the up-to-date search text |
| `@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 |