tags:

views:

50

answers:

1

Hi,

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

The application is something like, when i get 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

A: 

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.

Macarse
Hi Macarse, Thank you very much for the response.Actually I had idea about this when i posted the question, but i didnt know how to code it. Any help related to coding would be helpful.thank you once again for the reply.Regards,Tejas
Tejas J
I will edit, adding more info.
Macarse