在我的应用程序中,我想知道相机应用程序是否打开以及相机类型(前置摄像头或后置摄像头)?
答案 0 :(得分:0)
Camera课程可以解决您的问题。执行getCameraInfo以获取信息,然后使用CameraInfo。它有两个常数:
int CAMERA_FACING_BACK The facing of the camera is opposite to that of the screen.
int CAMERA_FACING_FRONT The facing of the camera is the same as that of the screen.
答案 1 :(得分:0)
检查
Camera.CameraInfo.CAMERA_FACING_BACK;
OR
Camera.CameraInfo.CAMERA_FACING_FRONT;