安卓相机闪光控制[英] Android Camera Flash Control

本文是小编为大家收集整理的关于安卓相机闪光控制的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

可能的副本:
推荐答案

我会刺伤...

http://developer.android.com/reference/android/hardware/camera.html

需要授予使用相机和使用<uses-feature>以进行相机功能:

  <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus" />

支持的功能在这里 http://developer.android.com/guide/topics/manifest/uses-feature-element.html

和您想要的相机是

android.hardware.camera
android.hardware.camera.autofocus
android.hardware.camera.flash

本文地址:https://www.itbaoku.cn/post/102732.html

问题描述

Possible Duplicate:
How Turn on only Camera flash light programmatically in android?

okay guys, I have been looking for a little while and I cant seem to find this anywhere, I would like to grant my camera application access to the flash bulbs or whatever you want to call them, If anyone knows and would like to share that would be greatly appreciated. Or if anyone can point me into the right direction that would be great.

推荐答案

I'll take a stab at this...

From http://developer.android.com/reference/android/hardware/Camera.html

you need to grant permission to use the camera and use the <uses-feature> for camera features you want to use:

  <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus" />

The features supported are here http://developer.android.com/guide/topics/manifest/uses-feature-element.html

and the camera ones you want are

android.hardware.camera
android.hardware.camera.autofocus
android.hardware.camera.flash