Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I agree that the API supports it, but that doesn't necessarily mean the Droid hardware/drivers support it. I think the whole point of calling getSupportedFlashModes() is to identify which modes the current hardware supports.
Anyway, has anyone gotten a chance to try it on the hardware? I didn't have time last night...
camera = Camera.open();
parameters = camera.getParameters();
List<String> list = parameters.getSupportedFlashModes();
if (list != null)
{
/*for(int i = 0; i < list.size(); i++)
{
Toast.makeText(context, list.get(i), Toast.LENGTH_LONG).show();
}*/
parameters.setFlashMode(Camera.Parameters.FLASH_MODE_ON);
camera.setParameters(parameters);
camera.startPreview();
Toast.makeText(context, "LED IS ON", Toast.LENGTH_SHORT).show();
}
Won't this kill the battery in like 20 minutes? or less ?
Doubt it... but who would have their LED's on for that long? I had an app on my old WM phone that turned the LED on - it would automatically turn it off after 120 seconds.Won't this kill the battery in like 20 minutes? or less ?
Doubt it... but who would have their LED's on for that long? I had an app on my old WM phone that turned the LED on - it would automatically turn it off after 120 seconds.
Apparently there was a silent update to the camera app... or camera hardware drivers... over the last couple of days. Perhaps the torch flash mode has been enabled as a consequence? Bears looking into.