Hi,
I'm not sure which article on
medium.com you referred to. It seems that
medium.com doesn't provide a whole project written by CameraX. If there is, please provide the link and we can do further check.
Could you try the
CameraXBasic sample project and check whether the same issues happen again on your simulator and Samsung M12 device? I run the
CameraXBasic sample app on an Android 11.0 emulator and an Android 11.0 Samsung S20+ 5G device. The results look correct. (I updated the library dependencies to 1.0.1 for core/camera2/lifecycle modules and 1.0.0-alpha27 for camera-view.)
For the M12 results you mentioned, did you apply the exif rotation degrees when displaying the captured image in the ImageView? This might be the root cause because the saved photo can be displayed correctly in the gallery app.
For the simulator part, I can't know the possible root cause unless I can reproduce it. Maybe you can double check it by the
CameraXBasic sample app or try some other different Android versions of simulators to see whether the issues still exist.
If the issues only happen under some specific settings, please also kindly provide the related information. So that we can clarify the issues. Thanks.