How does one retrieve the cameraID and use setTorchMode?

前端 未结 2 1604
孤城傲影
孤城傲影 2021-01-22 17:53

So Android M recently came out and it now has a built in cameralight function called setTorchMode. I was curious as to how this worked as the parameters are (String cameraID, Bo

2条回答
  •  清酒与你
    2021-01-22 18:21

    You should use CameraManager "getCameraIdList" function which will retrieve you a list of strings where each represent an active camera.

提交回复
热议问题