Android camera preview is dark

前端 未结 3 2143
长情又很酷
长情又很酷 2020-12-08 23:41

I am trying to create a custom camera app. I followed the Android Developer example from here with minor tweaks. However, my camera preview turns out to be rather dark. On t

3条回答
  •  误落风尘
    2020-12-08 23:52

    In addition to the previous answers, this can happen with Camera2 if you are doing

    createCaptureRequest(CameraDevice.TEMPLATE_RECORD)
    

    change to

    createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW)
    

    UPDATE: I have also begun to see a dark preview on some newer Pixel devices and this happens if you don't set the fps in the capture request or if you set the fps to something that the device can't handle BUT not on Samsung devices like the Note 10 and S10

提交回复
热议问题