Android Camera Flash Control [duplicate]

烂漫一生 提交于 2019-12-22 00:06:11

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/4294621/android-camera-flash-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!