2

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

Community
  • 1
  • 1
Tejas J
  • 51
  • 2
  • 12

1 Answers1

0

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
  • 91,829
  • 44
  • 175
  • 230
  • 1
    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 Jun 21 '10 at 06:25
  • I will edit, adding more info. – Macarse Jun 21 '10 at 15:39
  • `android.permission.FLASHLIGHT` any documented reference? – Muhammad Babar May 13 '17 at 15:08