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 current 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. It guarantees preview is visible only when implementationMode is TEXTURE_VIEW. When in SURFACE_VIEW implementationMode, it is possible that preview becomes visible slightly after state changes to STREAMING. For apps relying on the preview visible signal to be working correctly, please set TEXTURE_VIEW mode by setPreferredImplementationMode.