I am kind of newbie in Android development, so my apologies in advance if my question is trivial. In one part of my app I need a live preview of my rear camera, so I created
Same here. Since camera2 doesn't support devices < API 21, and don't want to implement the two APIs, it would be nice do get a quick fix.
I'm trying somthing like :
if (Build.MODEL.equals("Nexus 5x")){
// rotate camera 180°
mCamera.setDisplayOrientation(180);
}
But can't rotate the display of the camera. Gonna check if there is something to do with the PreviewCallback
Is it a bad thing to use the 2 apis ? As in this topic, it is not recommended : How to use Android's camera or camera2 API to support old and new API versions without deprecation notes?