Skip to content

Instantly share code, notes, and snippets.

@xizhang
Last active February 21, 2020 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xizhang/de7521de2b9da35769cc9a3f10f69609 to your computer and use it in GitHub Desktop.
Save xizhang/de7521de2b9da35769cc9a3f10f69609 to your computer and use it in GitHub Desktop.
// Set up use case
// Step 1. Config
val imageCapture = ImageCapture.Builder().setTargetResolution(Size(600, 800)).build()
// Step 2. Bind
CameraX.bindToLifecycle(lifecycleOwner, cameraSelector, imageCapture)
// Step 3. Act
imageCapture.takePicture(…)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment