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.
Actually, there was not an update. The camera started working due to a time related software bug - the same bug will cause it to stop working again in 24 days (unless a fix is pushed OTA).
are you using the autoFocus method? I have the code, and I get access to the camera, but the flash doesn't come on. I've tried setting the flash to ON and to AUTO and neither will cause the flash to come on.
So the big issue so far is getting a nice constant light instead of it cutting off every couple of seconds and then coming back. I think I can improve it with some careful timing instead of the hack I am using right now. Unfortunately there doesn't seem to be direct access to just turn on the LEDs.
So the big issue so far is getting a nice constant light instead of it cutting off every couple of seconds and then coming back. I think I can improve it with some careful timing instead of the hack I am using right now. Unfortunately there doesn't seem to be direct access to just turn on the LEDs.
are you focusing? or taking pictures? Also, are you doing an app or a widget? I was doing a widget. I was wondering if that's why mine wasn't working. I was planning on moving the code to an Activity to test it.
Last edited by eclipsed4utoo; November 18th, 2009 at 09:46 AM.
are you focusing? or taking pictures? Also, are you doing an app or a widget? I was doing a widget. I was wondering if that's why mine wasn't working. I was planning on moving the code to an Activity to test it.
Yeah, i thought there might be some success looping through a routine that continually fires commands to auto focus with the flash mode set to Auto. When the sensor detects darkness, it fires the flash so the auto focus can function properly (and so the shooter can see whats being focused on). Obviously, this will be inferior to an application that can use the built in functionality to just keep the flash on natively.
Ideally, we'd like to have access to the LED's without having to fire up the camera and burn through the battery.
Yeah, i thought there might be some success looping through a routine that continually fires commands to auto focus with the flash mode set to Auto. When the sensor detects darkness, it fires the flash so the auto focus can function properly (and so the shooter can see whats being focused on). Obviously, this will be inferior to an application that can use the built in functionality to just keep the flash on natively.
Ideally, we'd like to have access to the LED's without having to fire up the camera and burn through the battery.
Even if the Motorola updates the phone to include the missing flash mode that we need, we will still need to "use" the camera, since the only access to the LED flash is through the camera. I guess Google could update Android to handle the camera LEDs differently, but I don't see them doing that.
True... though in that case you could just... well... use the camera and not an external app.
Just because they expose the torch flash mode doesn't mean the camera app will support it. Also, just because you are "using" the camera to turn on the LEDs doesn't mean you can't build your interface around controlling the light.
Last edited by Chet; November 18th, 2009 at 10:33 AM.
Interesting. Sounds like we'll have to wait and see what the December 11th update is going to include. Hopefully they'll toss in the torch and red eye modes.
Also, if I don't show the Preview on the screen, the flash doesn't come on. Don't know how to get around that.
autoFocus is only valid after startPreview() has been called. However, I have found that you can call stopPreview() immediately after startPreview(). You never see the preview and the flash still works.
autoFocus is only valid after startPreview() has been called. However, I have found that you can call stopPreview() immediately after startPreview(). You never see the preview and the flash still works.
awesome...so that part is fixed now. so I guess we are at the same point. Figuring out the "off" period between the flashes.
I had it there, but the "off" period was still pretty long. I was able to get the "off" period to be shorter with the background thread.
hum... so how often are you calling autofocus in your background thread? infinite loop or a timer? I was running a timer before and was getting more off period. I believe the timer's run method is executed in its own thread.
hum... so how often are you calling autofocus in your background thread? infinite loop or a timer? I was running a timer before and was getting more off period. I believe the timer's run method is executed in its own thread.
infinite until a button is clicked. the while loop checks a public variable for the class. if that variable is true, it continues to call the autoFocus(). so when the button is clicked, I just set that value to false, and it stops.
Ok, so who would like to try it out? I am willing to email my test .apk if someone wants to test it. You will have to enable installing apps from "Unknown Sources".
Hello Chet,
Thanks for working on this project, I'm about to start tackling progging on android soon. I am willing to beta this for you. If interested...
Thanks.
Last edited by allen2288; November 19th, 2009 at 08:28 PM.
Reason: Removed Email addy.
Ok, so who would like to try it out? I am willing to email my test .apk if someone wants to test it. You will have to enable installing apps from "Unknown Sources".
The Motorola Droid - the first ever Verizon Android Phone - exploded onto the mobile market with an incredibly successful ad campaign that brough Android to the masses. With a huge and vibrant touchscreen, solid metal body, full QWERTY keyboard, 5M... Read More