FakeHost


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 functions

Unit

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

Unit

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

Public functions

performNotificationActionClick

Added in 1.1.0
fun performNotificationActionClick(pendingIntent: PendingIntent): Unit

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
fun setMicrophoneInputData(inputStream: InputStream): Unit

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