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.
精彩评论