Android Jetpack: Understand the CameraX camera-support library (Google I/O'19)

Android Developers · 47K views · 2019 · 29:07

Open on YouTube

Software (other)Consumer devices & gadgetstalkdated

Why Stack Overflow recommends it

Stack Overflow users link it as the official introduction to CameraX when answering lifecycle binding and camera API questions, though one asker notes its sample code became outdated after API changes.

Recommended by 2 people across 2 different months, 2019 to 2020.

What it is

A Google I/O 2019 session introducing CameraX, the Jetpack camera support library meant to give consistent behavior across many Android camera devices with little integration effort. Android team members Vinit Modi, James Fung, Franklin Wu and Trevor McGuire present it, including how it eases adding machine learning.

What people said

Recommends Tuan Nguyen · 2019-05 · Stack Overflow · on “Android CameraX doesn't show anything”

Because the ```bindToLifeCycle()``` is a part of CameraX flow, to detect when the preview should start or stop base on the activity/fragment life cycle, so we absolutely need it. You can refer the cameraX document or watch the CameraX session in Google IO 2019: [this video] to grab more information. We have nothing to do except waiting for Google to fix this problem :).

Recommends Ben Butterworth · 2020-05 · Stack Overflow · on “Tensorflow's app Camera Images are Blurry”

You are using a very old implementation of the Camera API in LegacyCameraConnectionFragment , which is deprecated [LINK] . You should use [LINK] android.hardware.camera2 , which is being used in the other tensorflow example, CameraConnectionFragment [LINK] . Recently, CameraX was released to Beta, and there would probably be fewer examples for you to follow online, but some people are enjoying [LINK] it already. More info about cameraX here [this video] . Looks like CameraConnectionFragment.java is already using optimal settings [LINK] for you? // Auto focus should be continuous for camera preview. previewRequestBuilder.set( CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOU

Cites SMBiggs · 2020-08 · Stack Overflow · on “What happened to CameraX.unbindAll() method?”

I'm trying to follow code samples I've found on the web ( Gabriel Tanner [LINK] , Ray Wenderlich [LINK] , Official Introduction [this video] ), but I usually get stymied on the very first line: CameraX.unbindAll() Compiler complains that unbindAll() is an unresolved reference (Kotlin). The sample code from here [LINK] is the only reference that does not use it. But all the other sample codes have it, including Google's own videos. I can't even find any references to this method in Google's docs. What happened? Have changes in the past few months already made all these excited introductions obsolete? I'm evaluating CameraX to see if it's worth our company's time to switch our code from Camera2 to