Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,807,275 Members 42,957 Now Online
XDA Developers Android and Mobile Development Forum

[UPDATED 28-04-2009] TorchButton v1.5, using camera LED for flashlight

Tip us?
NetRipper's Avatar
Senior Member - OP
Thanks Meter 41
Posts: 563
Join Date: Feb 2006
Location: 's-Gravendeel

Originally Posted by da_jojo View Post
the flashlight has a normal condition and a very bright condition. would it be possible to make a dimmer on the flashlight so that for example one can attach it to the volume buttons on the side ?
The flash indeed has two modes. However, the very bright mode is automatically disabled after 1 or 2 seconds by the camera driver. It's possible to make it sleep for that amount of time and re-set the bright mode, but I can't imagine it being very good for the LED to burn for a longer period of time at that mode. It would also flicker every 1 or 2 seconds.

I think the normal LED is bright enough, so unless the demand for the extra bright setting is overwhelming, I'll keep it like this.
da_jojo's Avatar
Senior Member
Thanks Meter 2
Posts: 566
Join Date: Nov 2006
Location: Utrecht
mm that sucks.
its not a great idea to have a flashing flashlight unless one wants to drive anyone crazy or likes discolights ... maybe an idea lol... a stroboscope.. or some sort of signaling light..

it wouldnt hurt to have the LED on for a longer period. since the lifespan is over 50000 hours and it is running on lower power then intended .. only thing, is that it takes toll on the battery. i wouldnt care to much for the LED as it will last longer then the phone's display.
If something sucks , it better be your girl

-HTC Touch Pro > SPL: 1.9 koekie GSM: CRC_52.58.25.30H_1.11.25.01.nb OS: 5.2.28005 WM6.5 energy custom running android 2.2 with ps3 hackmod
-Dell Streak 2.3.7 >custom korean rom
-Samsung SIII 32gb Int. unbranded unlocked, rooted , CWM philZ ,Anbech bootanim enabler, oldbiosbootlogo
-PC: More then MyCom have in their store.. using W8 x64
-Koekies: Lu, time-out, robuuste koekjes
Donations: PLEASE give these to the WWF
Senior Member
Thanks Meter 2
Posts: 306
Join Date: Feb 2006
Looks good to me, but you could always play on words and rename it TorchPro. :D
Current - HTC HD2 (Leo)
Retired - Raphael, Hermes, Wizard, Loox 720, iPAQ 2210
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Aug 2008
Location: W-w
yesterday I wrote for myself something just like yours. but i prefered fullscreen button which would change color to black while LED switches on (useful in dark places - eyes are not blinded by bright screen).

it is possible to change timeout (setting written in registry) using track bar or up-down, left-right keys.

enter key switches LED on and off. just like big on screeen button.

have fun.
Attached Files
File Type: cab FlashLightCab.CAB - [Click for QR Code] (29.0 KB, 435 views)
Thanks Meter 1
Posts: 96
Join Date: Dec 2007
Great stuff, works really well.
Nadavi's Avatar
Senior Member
Thanks Meter 4
Posts: 691
Join Date: Mar 2005

Originally Posted by steveoidm View Post
Great stuff, works really well.

Just what i was looking for,
Senior Member
Thanks Meter 19
Posts: 740
Join Date: Apr 2005
Location: Nové Mesto nad Váhom/Slovak Republic/Central EU
Thank you guys. You,re perfect. I was very sad,when I found out,that VJCandela doesn't work.
Samsung Galaxy Note JellyBean
Touch Pro @ EnergyROM WM6.5
Himalaya WM6 @ 7.0b.40CS
Typhoon WM6.1,Hurricane WM2003SE,Oxygene WM5,Toshiba Portege G710 WM6
HTC Hero @ Elelinux 7.1 Gingerbread
ZaJules's Avatar
Senior Member
Thanks Meter 59
Posts: 333
Join Date: Sep 2005
Location: Port Elizabeth
new feature request.

Using the Gsensor let it keep the led on as long as the device senses motion, put it down and it turns the led of in 10 seconds.



Retired Devices:
Wallaby - Blue Angel - Magician - Wizard - Universal - Hermes - Kaiser - Nike - Athena - Diamond - Rose - Raphael - Shift - Leo - Rhodium - (iPhone4) - Galaxy SIII - Galaxy 10.1v Tab - (iPhone 4S) - Acer Iconia A501 Tab - Asus Transformer TF300TG/T Tabs - Coby Kyros 7" - Asus Transformer Infinity TF700T Tab

Current Devices:
Galaxy S5 + Gear 2
Lenovo Think Pad
(iPhone 5S)
billu's Avatar
Senior Member
Thanks Meter 0
Posts: 269
Join Date: Dec 2007
Now thats an excellent suggestion.

Are we 100% sure that leaving the LED on for prolonged periods at the low level is not going to have any adverse effect on it.
(current devices in bold)
MDA Vario III --> Touch Pro --> Touch HD -->Touch pro 2 --> HTC HD2 --> Galaxy SII --> Galaxy Note
XDA Exec --> AMEO --> OQO model 2 --> Viliv S5 HSDPA
Nokia N70 --> Nokia N95--> Samsung i8910
I-mate 8502 --> Orange San Fransisco --> Orange Monte Carlo
Senior Member
Thanks Meter 1
Posts: 206
Join Date: Apr 2008
Any chance of a version for the LG KS20 ?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Play Music on Android Wear with Stellio Music Player

Android Wear smartwatchesare growing inpopularity every day. Some devices have already … more

Schedule is up for xda:devcon ’14

With xda:devcon ’14 just around the corner, and the venue close to selling out, there is a lot … more

aLogcat Returns Thanks to XDA Love

The developers of Android, that is Google, gave users several great debugging tools that can be used in … more

And the Winners in the XDA Pebble Development Challenge Are…

Almost two months ago, we set out with Pebble to findthree amazing … more