I've see that there's a lot of torch app that offer also a widget for switch on flashlight. I'm trying to do my own widget for perform the same task, but i have some questions. I've already an app for switch on and off camera flashlight, but it use a hidden surfaceView inside layout for do that (flashlight doesn't switch on without surfaceView). Now, as i could read from developer site, SurfaceView is not admitted inside widget layout. What's the correct way to implement this kind of widget?
Asked
Active
Viewed 343 times
0
-
refer this link http://stackoverflow.com/questions/7515309/widget-for-turning-on-off-camera-flashlight-in-android hope it will help you – Jigar Sep 13 '14 at 10:21
-
refer this link as well http://stackoverflow.com/questions/6068803/how-to-turn-on-camera-flash-light-programmatically-in-android – Jigar Sep 13 '14 at 10:21
-
it's an old code, and it doesn't work on my device (nexus 5) – giozh Sep 13 '14 at 16:00