Android 5,camera2只使用闪光灯 [英] Android 5, camera2 use only flash

查看:1576
本文介绍了Android 5,camera2只使用闪光灯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要只使用闪光灯与API camera2(Android 5,API级别21),如火炬应用程序。
但是我发现的所有示例都需要在视图中显示摄像机流

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 stream in a view

推荐答案

https://github.com/pinguo-yuyidong /Camera2/blob/master/app/src/main/java/us/yydcdut/androidltest/otheractivity/FlashActivity.java

在这里,你不需要预览打开闪光。

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.

这篇关于Android 5,camera2只使用闪光灯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆