API Documentation
According to the Android developers guide for android.hardware.Camera, they state: We recommend using the new android.hardware.camera2 API for new applications.
On the information page about android.hardware.camera2, (linked above), it is stated: The android.hardware.camera2 package provides an interface to individual camera devices connected to an Android device. It replaces the deprecated Camera class.
The problem
When you check that documentation you'll find that the implementation of these 2 Camera API's are very different.
For example getting camera orientation on android.hardware.camera @OverridepublicintgetOrientation(finalintcameraId){Camera.CameraInfoinfo=newCamera.CameraInfo();Camera.getCameraInfo(cameraId,info);returninfo.orientation;}
Versus android.hardware.camera2 @OverridepublicintgetOrientation(finalintcameraId){try{CameraManagermanager=(Cam