How to turn on front flash light programmatically in Android?

后端 未结 11 1602
执笔经年
执笔经年 2020-11-22 00:17

I want to turn on front flash light (not with camera preview) programmatically in Android. I googled for it but the help i found referred me to this page

Does anyo

11条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 01:02

    You can also use the following code to turn off the flash.

    Camera.Parameters params = mCamera.getParameters()
    p.setFlashMode(Parameters.FLASH_MODE_OFF);
    mCamera.setParameters(params);
    

提交回复
热议问题