SearchCallbackDelegate


@CarProtocol
public interface SearchCallbackDelegate


A host-side delegate for sending androidx.car.app.model.SearchTemplate.SearchCallback events to the car app.

Summary

Public methods

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

Notifies that the user has submitted the search.

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

Notifies that the search text has changed.

Public methods

sendSearchSubmitted

Added in 1.0.0
abstract void sendSearchSubmitted(
    @NonNull String searchText,
    @NonNull OnDoneCallback callback
)

Notifies that the user has submitted the search.

Parameters
@NonNull String searchText

the search text that was submitted

@NonNull OnDoneCallback callback

the OnDoneCallback to trigger when the client finishes handling the event

sendSearchTextChanged

Added in 1.0.0
abstract void sendSearchTextChanged(
    @NonNull String searchText,
    @NonNull OnDoneCallback callback
)

Notifies that the search text has changed.

Parameters
@NonNull String searchText

the up-to-date search text

@NonNull OnDoneCallback callback

the OnDoneCallback to trigger when the client finishes handling the event