Google is committed to advancing racial equity for Black communities. See how.

StreamState

class StreamState
kotlin.Any
   ↳ kotlin.Enum<androidx.camera.view.PreviewView.StreamState>
   ↳ androidx.camera.view.PreviewView.StreamState

Definitions for the preview stream state.

Summary

Enum values

Preview is not visible yet.

Preview is streaming.

Enum values

IDLE

enum val IDLE : PreviewView.StreamState

Preview is not visible yet.

STREAMING

enum val STREAMING : PreviewView.StreamState

Preview is streaming.

This state only guarantees the preview is streaming when the implementation mode is ImplementationMode#COMPATIBLE. When in ImplementationMode#PERFORMANCE mode, it is possible that the preview becomes visible slightly after the state has changed. For apps requiring a precise signal for when the preview starts, please set ImplementationMode#COMPATIBLE mode via setImplementationMode.