【问题标题】:Android - Using Camera Flash [duplicate]Android - 使用相机闪光灯 [重复]
【发布时间】:2011-03-06 00:00:44
【问题描述】:

可能重复:
How Turn on only Camera flash light programmatically in android?

我正在开发一个 Android 应用程序,我必须在其中使用相机闪光灯。

该应用程序类似于,当我收到短信时,相机闪光灯会闪烁 5 次,当我接到来电时它会闪烁 7 次,类似这样。

我已经搜索了很多,但我没有得到关于如何像这样访问相机闪光灯的确切解决方案。

所以,如果有人能在这个话题上提供帮助,那就太好了。

谢谢。

问候, 光辉

【问题讨论】:

    标签: android


    【解决方案1】:

    我会研究android.permission.FLASHLIGHT。 Android manifests 的权限看起来很有希望:

    <!-- 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" />
    

    编辑:

    我刚刚找到了一个使用此权限的项目。 检查quick-settings' src code

    我会调查/src/com/bwx/bequick/flashlight

    【讨论】:

    • 您好 Macarse,非常感谢您的回复。实际上,当我发布问题时,我对此有所了解,但我不知道如何编码。任何与编码相关的帮助都会有所帮助。再次感谢您的回复。问候,光辉
    • 我会编辑,添加更多信息。
    • android.permission.FLASHLIGHT 有任何文档参考吗?
    猜你喜欢
    • 2011-05-16
    • 1970-01-01
    • 1970-01-01
    • 2011-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多