I am writing a simple Widget for Android Devices. When user press on the widget a Camera Flashlight must turn Off and On. My Widget works f
There is no official android API allowing you to manipulate camera flash alone. You have to go via official camera API - and it does not formally define how to manipulate flash LED. YOu can set different modes, but camera software can ignore it at will.
So, if this works on sony it does not have to vork for other hardware. There could be (and most probably there are) some vendor specific undocumented APIs though.
A bit late in response,however, the camera has to pass a surface on some devices in order to turn flash on. Given that surface view is not applicable, you need to implement a surface texture instead, available as of api 11