• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root MotoTorch LED flashlight app not working...

Yeah, when I was on 2.1 it never made any noise, just turned on the LED. On 2.2 it's making the shutter sound but does nothing else. Doesn't FC; the widget lights up as if it is working, but no light.
Anyone else noticing this?

Can you open the DDMS(assuming you have the Android SDK installed) and use it to get the stack trace? It may be erroring.
 
Upvote 0
Yeah, when I was on 2.1 it never made any noise, just turned on the LED. On 2.2 it's making the shutter sound but does nothing else. Doesn't FC; the widget lights up as if it is working, but no light.
Anyone else noticing this?

Same exact scenario for me too. The version before the last update worked perfect in the latest (second) 2.2 build. But when I saw the new update in the market with "2.2 support" I figured it would be good, but it broke it for me too :(. I hear the same camera clicking when I launch the app, but no LED activity whatsoever. So until the dev gets a working version out, can some link an .apk to the last version so I can get it working again? Somehow I only have a data backup and not app backup of it in Titanium.

Thanks Elipse for keeping us posted on your progress :).
 
Upvote 0

Thanks, but I'm not sure what to do with a ".gz" file..? I saw that Titanium uses them so I tried dropping it in my Titanium backups folder and it's not showing up in Titanium anywhere :(. I also tried re-naming it to just ".apk" and got a parsing error upon trying to install. Would you mind letting me know what to do with this file?

Thanks!
 
Upvote 0
I think I am going to go with the option to let you guys tell me if you are running a ROM or not. If you are, and I determine that you are running 2.2, it will revert back to the old way. If you tell me that you are not running a ROM and you are running 2.2, then it will use the new way.

That's about all I can do. I can't fix the ROMs.
 
Upvote 0
Dumping stack now...Ummmm...so I'm getting this with logcat when I use Moto torch:
W/CameraService( 1011): Attempt to use locked camera (client 0x0) from different
process (old pid 0, new pid 18279)
D/CameraHal( 1011): stopPreview
D/CameraHal( 1011): CameraHal release

This is what I get just trying to get into DDMS:Error Loading Preferences
31:05 E/ddms: shutting down due to uncaught exception
31:05 E/ddms: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Display.checkDisplay(Unknown Source)
at org.eclipse.swt.widgets.Display.create(Unknown Source)
at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at com.android.ddms.UIThread.runUI(UIThread.java:421)
at com.android.ddms.Main.main(Main.java:105)

When I turn on the moto torch is when the camera service stuff comes up.
I'll PM you my dump. Hope this helps. I'm up past my bedtime.
 
  • Like
Reactions: eclipsed4utoo
Upvote 0
TeslaLED works fine on Droid 2.2. (And it works on 2.1 too). And I just released some more fixes today to get rid of the occasional "camera timeout"problem

market://search?q=pname:com.teslacoilsw.flashlight



@eclipsed4utoo: Some of the leaked 2.2 support setFlashlightEnabled (FRF57) and some don't (FRFxx). All of them seems to support the FLASH_MODE_TORCH but not nearly as easily as the Nexus. And indeed a Camera.open(); blocks any other camera-using app until you release(). Even stopPreview() alone isn't enough. It's annoying but at least all individual apps can add FLASH_MODE_TORCH support so people won't need to use a third-party program just to turn on the LED while they record video.
 
Upvote 0
TeslaLED works fine on Droid 2.2. (And it works on 2.1 too). And I just released some more fixes today to get rid of the occasional "camera timeout"problem

market://search?q=pname:com.teslacoilsw.flashlight



@eclipsed4utoo: Some of the leaked 2.2 support setFlashlightEnabled (FRF57) and some don't (FRFxx). All of them seems to support the FLASH_MODE_TORCH but not nearly as easily as the Nexus. And indeed a Camera.open(); blocks any other camera-using app until you release(). Even stopPreview() alone isn't enough. It's annoying but at least all individual apps can add FLASH_MODE_TORCH support so people won't need to use a third-party program just to turn on the LED while they record video.

Thanks. I am using FLASH_MODE_TORCH, which only seems to work when I have control over the camera, and as soon as I release it, it turns off the flash(as expected). This was the behavior on the Nexus One that I saw, is it the same behavior on the leaked ROMs?

How do I determine whether a leaked ROM is running rather than the stock 2.2? I basically have the logic that if the version is less than 8, I use the setFlashlightEnabled(for the DROID running stock 2.1), and if it's 8 or greater, I use FLASH_MODE_TORCH with the camera.
 
Upvote 0
Thanks. I am using FLASH_MODE_TORCH, which only seems to work when I have control over the camera, and as soon as I release it, it turns off the flash(as expected). This was the behavior on the Nexus One that I saw, is it the same behavior on the leaked ROMs?

How do I determine whether a leaked ROM is running rather than the stock 2.2? I basically have the logic that if the version is less than 8, I use the setFlashlightEnabled(for the DROID running stock 2.1), and if it's 8 or greater, I use FLASH_MODE_TORCH with the camera.

This is a simple one... If you are using a Droid ( assumed since that is the forum area you are posting in ) and you are running a Froyo based ROM... its a leaked version since there is no stock version currently released for the Droid.

You should also know which one you are using since you would have had to flash to it... unless you just blindly selected the first one you saw without paying any attention. To see which ROM you have... goto Settings-> About Phone
 
Upvote 0
This is a simple one... If you are using a Droid ( assumed since that is the forum area you are posting in ) and you are running a Froyo based ROM... its a leaked version since there is no stock version currently released for the Droid.

You should also know which one you are using since you would have had to flash to it... unless you just blindly selected the first one you saw without paying any attention. To see which ROM you have... goto Settings-> About Phone

I am talking about from a code standpoint...How I can tell, from code, whether the device is running stock or a leaked/custom ROM?

I am more interested in how Kevin got TeslaLED to work on the ROMs, since the code isn't that complicated. As far as I know, there is only two ways of turning on the LEDs...with(supported on 2.2) or without the camera(only supported on DROID and Milestone). Maybe it's a setting I missed or something.
 
Upvote 0
I am talking about from a code standpoint...How I can tell, from code, whether the device is running stock or a leaked/custom ROM?

I actually just always use the FLASH_MODE_TORCH method on Android 2.2. My original plan was to ask the user which mode to use if they were running SDK_INT > 8 and android.os.Build.ID was not "FRFxx", but I haven't done that yet. I haven't played with the custom roms too much, but what do their android.os.Build settings look like?

Droid 2.2 is different than Nexus 2.2. The Droid wants a surface object and the Nexus doesn't care.
 
  • Like
Reactions: eclipsed4utoo
Upvote 0
I finally decided to download and see what all the hype with this was about...

Anyway, no FCs for me, but not light up of the LED either....there is the sound of the camera loading when I start the app, but the camera doesn't load.

LED Flashlight works fine for me on Fab's Nexthemed BB Froyo...
 
Upvote 0
OK, so as I am reading it, the new 3.1 breaks on FRF57 but the old 2.8 works?

yes, because I changed it to programmatically determine if the device was running 2.2(or greater). I didn't know that the same code that worked for the Nexus One wouldn't work for the DROID when both were running the same Android version.

I will be working on a fix today. It will probably be later this afternoon or tonight before I get a release out.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones