开发者

Android - Using Camera Flash [duplicate]

开发者 https://www.devze.com 2023-01-03 22:12 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How Turn on only Camera flash light programmatically in android?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How Turn on only Camera flash light programmatically in android?

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

The application is something like, when i g开发者_如何转开发et 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.

thank you.

Regards, Tejas


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

EDIT:

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

I would look into /src/com/bwx/bequick/flashlight.

0

精彩评论

暂无评论...
验证码 换一张
取 消