Android 5, camera2 use only flash

后端 未结 4 2011
生来不讨喜
生来不讨喜 2020-11-30 05:27

I need to use only the flash with the API camera2 (Android 5, API level 21), like torch applications. But all the examples that I found requires the display of camera strea

4条回答
  •  一向
    一向 (楼主)
    2020-11-30 05:44

    https://github.com/pinguo-yuyidong/Camera2/blob/master/app/src/main/java/us/yydcdut/androidltest/otheractivity/FlashActivity.java
    here,you don't need the preview to open the flash.

提交回复
热议问题