How do I get the currently selected camera?
I'm interested in knowing when the new selection, which I set, is actually realized.
Background is, I have implemented a custom viewer which suitably transforms the surface according to the camera characteristics and displays the result. But when switching cameras I get a short display of the previous camera's image but using the transform characteristics of the newly selected camera.
It looks like the transform for the new camera is engaging too soon. Building the new transform characteristics depends on bindToLifecycle(), which I expected to have implemented the camera switch on completion. But it appears this is not the case.
Since image flow is discrete in frames, a per frame test would probably be an OK alternative to a callback.
"androidx.camera:camera-core:1.1.0-alpha08",
"androidx.camera:camera-camera2:1.1.0-alpha08",
"androidx.camera:camera-lifecycle:1.1.0-alpha08",
"androidx.lifecycle:lifecycle-process:2.3.0",
"androidx.core:core:1.3.2"