ProjectedActivityCompat


@ExperimentalProjectedApi
class ProjectedActivityCompat : 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 companion functions

suspend ProjectedActivityCompat
create(context: Context)

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

Public functions

open Unit

Public properties

Flow<ProjectedInputEvent>

Flow providing a stream of Projected input events.

Public companion functions

create

suspend fun create(context: Context): ProjectedActivityCompat

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

Parameters
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

Public functions

close

Added in 1.0.0-alpha03
open fun close(): Unit

Public properties

projectedInputEvents

Added in 1.0.0-alpha03
val projectedInputEventsFlow<ProjectedInputEvent>

Flow providing a stream of Projected input events.