Problem Description
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 fine when I launch it on Sony Ericsson Arc, but when I try to launch Widget on Samsung NexusS or Samsung Galaxy SII it do nothing (doesn't work).
Researches
I google this issue and find some answers for it. Most of users suggest to use SurfaceView and really surface view with size 1 pixel really work if it is placed on activity, but it doesn't work in my case (Widget doesn't support SurfaceViw).
LED flashlight on Galaxy Nexus controllable by what API?
I found this article and it was very useful, but how can I use it in my case, in the case if I want turn on light from widget ? I know that I can't use Surface view in Widget View as it is not supported yet, any Ideas ?
Question
Please provide me some links, open source projects or articles or something that can be helpful on how I can turn light on/off from the widget on Nexus S One and Galaxy S II.
Is there any universal code for working with camera on different phones ? Any information will be helpful.
Maybe I need to use native library ?
Thanks.