ProjectedActivityCompat


@ExperimentalProjectedApi
public final class ProjectedActivityCompat implements AutoCloseable


Class providing Projected device-specific features for Activity, like listening to Projected input events.

Use create to create an instance of this class. Use close to clear the instance.

Summary

Public methods

void
static final @NonNull ProjectedActivityCompat

Connects to the service providing features for Projected devices and returns the ProjectedActivityCompat when the connection is established.

final @NonNull Flow<@NonNull ProjectedInputEvent>

Flow providing a stream of Projected input events.

Public methods

close

Added in 1.0.0-alpha03
public void close()

create

public static final @NonNull ProjectedActivityCompat create(@NonNull Context context)

Connects to the service providing features for Projected devices and returns the ProjectedActivityCompat when the connection is established.

Parameters
@NonNull Context context

The context to use for binding to the service.

Throws
kotlin.IllegalStateException

if the projected service is not found or binding is not permitted

getProjectedInputEvents

Added in 1.0.0-alpha03
public final @NonNull Flow<@NonNull ProjectedInputEventgetProjectedInputEvents()

Flow providing a stream of Projected input events.