FakeHost

public class FakeHost


A fake that simulates the behavior of the host of a car app.

This fake allows sending a PendingIntent as if the user clicked on a notification action.

It will also perform expected host behaviors such as calling onGetTemplate after invalidate is called.

Summary

Public methods

void

Sends the given pending intent as if the user clicked on a notification action.

void

Sets an InputStream to use as the source for microphone data input.

Public methods

performNotificationActionClick

Added in 1.1.0
public void performNotificationActionClick(@NonNull PendingIntent pendingIntent)

Sends the given pending intent as if the user clicked on a notification action.

Throws
java.lang.NullPointerException

if pendingIntent is null

setMicrophoneInputData

Added in 1.3.0
@ExperimentalCarApi
public void setMicrophoneInputData(@NonNull InputStream inputStream)

Sets an InputStream to use as the source for microphone data input.