set

fun set(mediaProjection: MediaProjection)

Stores mediaProjection as the active projection token and registers its callback. Any previous projection is unregistered, its virtual display released, and it is stopped. Calling again with the current projection is a no-op.