Skip to content

Instantly share code, notes, and snippets.

@owahltinez
Created August 27, 2019 13:22
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 owahltinez/30b019422af30d1b4c22b4439ac44bb7 to your computer and use it in GitHub Desktop.
Save owahltinez/30b019422af30d1b4c22b4439ac44bb7 to your computer and use it in GitHub Desktop.
// RECOMMENDED: Bind use cases to a lifecycle in a single call:
CameraX.bindToLifecycle(
this as LifecycleOwner, preview, imageCapture, imageAnalyzer)
// Do *NOT* bind your use cases like this
CameraX.bindToLifecycle(this as LifecycleOwner, preview)
CameraX.bindToLifecycle(this as LifecycleOwner, imageCapture)
CameraX.bindToLifecycle(this as LifecycleOwner, imageAnalyzer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment