Android的 - 使用相机闪光灯 [英] Android - Using Camera Flash

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

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/6068803/how-turn-on-only-camera-flash-light-programmatically-in-android">How在机器人只打开相机闪光灯编程?

我开发一个Android应用程序中,我有相机闪光灯的工作。

I am developing an android application in which i have to work with camera flash.

该应用程序是一样的东西,当我让说的短信,相机的闪光灯会闪5次,WHN我得到一个拨入的电话会闪烁7次,这样的事情。

The application is something like, when i get let say SMS, the camera flash will flash for 5 times, whn i get an incoming phone it will flash for 7 times, something like that.

我寻觅了很多,但我不是获取有关如何访问照相机闪光灯这样的精确解。

I have searched a lot but i m not getting the exact solution about how to access the camera flash like this.

所以,如果有人能帮助这个话题,这应该是很大的。

so, if anyone can help on this topic, that should be great.

感谢你。

问候, 特加斯

推荐答案

我会研究有关 android.permission.FLASHLIGHT 。 Android的舱单的许可看起来很有希望:

I would research about android.permission.FLASHLIGHT. Android manifests' permission looks promising:

<!-- Allows access to the flashlight -->
<permission android:name="android.permission.FLASHLIGHT"
    android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
    android:protectionLevel="normal"
    android:label="@string/permlab_flashlight"
    android:description="@string/permdesc_flashlight" />

编辑:

我刚刚发现,使用该权限的项目。 检查快速设置SRC code

I just found a project that uses this permission. Check quick-settings' src code.

我会去了解一下<一个href="http://$c$c.google.com/p/quick-settings/source/browse/trunk/quick-settings/#quick-settings/src/com/bwx/bequick/flashlight"相对=nofollow> / src目录/ COM / BWX / bequick /手电筒。

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

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