Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
val characteristics: CameraCharacteristics = ...
val context = this as Context // assuming we are inside of an activity
val surfaceViewSize = getPreviewOutputSize(
context, characteristics,
val imageReaderSize = getPreviewOutputSize(
context, characteristics,, format = ImageFormat.YUV_420_888)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.