问题描述
可能的副本:
推荐答案我会刺伤...
从 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
问题描述
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