Android HTC phone with two rear cameras

烂漫一生 提交于 2019-12-04 05:41:29

问题


I'm trying to select the rear camera in HTC phones but in the API I have only two cameras: CAMERA_FACING_FRONT, CAMERA_FACING_BACK. When I call the open() with CAMERA_FACING_BACK, I get the camera that I don't want (lower resolution than the other one).

Which id should I use to open the other rear camera?


回答1:


You cannot select the camera directly.

You should open the camera with CAMERA_FACING_BACK and set a picture size (it has 27 possible different sizes!).

Accordingly with picture size you set to the software camera, one of hardware cameras will be the chosen one.



来源:https://stackoverflow.com/questions/27323438/android-htc-phone-with-two-rear-cameras

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!