启用相机单独机身仅LED不Camera.open在Android的? [英] Enabling Camera LED alone without Camera.open in Android?

查看:190
本文介绍了启用相机单独机身仅LED不Camera.open在Android的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以仅启用LED设备,而不必使用 Camera.open() Android中?

Is it possible to enable only LED of the device without using Camera.open() in Android?

由于LED灯也是移动一个单独的硬件,应该有办法单独访问它无需使用 Camera.open()和设置火炬参数到它。

Since LED light is also a separate hardware in mobile, there should be way to access it alone without using Camera.open() and setting Torch parameter to it.

为什么我问的原因是我有一个建在空气中需要Flash与摄像头,以启用也是一个视频应用。相机会进行由AIR和Flash开放将采用Android原生扩展启用。但它不工作,因为我们不能在同一时间打开多个摄像头的实例。

The reason why I am asking is I have a Video App which is built in AIR which requires Flash to enabled with Camera also. The Camera will be made open by AIR and Flash will be enabled using Android Native extension. But its not working as we cannot have multiple camera instance opened at the same time.

推荐答案

没有,你需要打开相机 Camera.open() 然后 setFlashMode() FLASH_MODE_TORCH 来持续开启LED灯。该LED应该当相机关闭熄灭。而你需要关闭相机当你的进程进入后台。所以,你真的不能做到这一点在第二个应用程序。

No, you need to open the Camera with Camera.open() and then setFlashMode() to FLASH_MODE_TORCH to enable the LED light continuously. The LED is supposed to go off when the Camera is closed. And you need to close the Camera when your process goes into the background. So you really can't do this in a second app.

如何使用ANE叫 setFlashMode()?这真的会做正确的方式。我从来没有尝试过直接让不知道是否有一个问题,从工作停止。

How about using ANE to call setFlashMode()? That would really be the right way to do it. I have never tried it directly so do not know if there's a catch that stops it from working.

这篇关于启用相机单独机身仅LED不Camera.open在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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