I can't seem to get the camera LED to light up as a flashlight with my Droid X. I've tried quite a bit, and开发者_如何学编程 am down to trying to decompile some apps that I know work. How can I get it to work?
I really think decompiling apps is going to be the only way for me to figure this out. :(
[OT?] − As a Milestone's (the european droid) owner, I have installed CyanogenMod 7 for Milestone and that (great) rom is packaged with the TorchRoot application. The flashlight works well on my rooted milestone… Maybe http://code.google.com/p/n1torch/ could be a good start. From http://n1torch.googlecode.com/svn-history/r23/trunk/src/net/cactii/flash/RootTorchService.java, we can deduce that you need to be root to access the device.
The only thing I found that works on the Droid X is the code presented by Siddhpura Amit part way down the page in this answer here: Use camera flashlight in Android. He checks the manufacturer and checks to see if it contains the string "motorola." If so, he has special code that can switch the camera Flash LED on or off. I can verify that it does work as I have a Motorola Droid X and this is code I use in my applications.
精彩评论