Soft key Leds Notifications v0.3 (Root) - Samsung Galaxy S II Plus

This is an application I made for my phone to keep the button leds on when we receive a phonecall or SMS only.
Needs root access.
May harm your phone, I do not take any responsibility. Use it at your own risk.
i don t know what may happen if the leds are on for days. May harm them
my phone is i9105p.
official rom
root
android 4.2.2
I9105PXXUBMI1
KERNEL 3.0.31-1743918
BUILD NUMBER I9105PXXUBMI3
The Activate button enables the service.
The Deactivate button disables it.
the java code (3 classes)
Make sure task manager dont kill it. In Settings you can enable notification (prevent android task manager to kill it).
V.0.1
now works even if the event find the screen on
notification - prevent auto close. (no option to turn notification off yet, but i tried to keep it unoticable)
The only way to close is by android task manager which calls ondestroy command. (exit button to add)
V0.2
Settings:
- Screen timeout adjustable - propably help with other devices (set how much time takes the phone to close the screen when the event wakes the screen.)
- path to brightness editable
- notification to prevent android task manager on / off
V0.3
two mini bug fixed
1. (maybe) app does not respond on message receive when service is off.
2. now it does not lock led brightness (may caused issues with other apps)
How it works:
Activate / DeActivate Service from app.

It only works if
echo 1 > /sys/class/leds/button-backlight/brightness;
(or any path for your device's brightness works)

Hi!
Thanks for your help in the other thread! Unfortunately my led brightness path is different so your app is not working on my device.
Would you mind if I use your code in order to develop an app suitable for my specific device?

GustavYgman said:
Hi!
Thanks for your help in the other thread! Unfortunately my led brightness path is different so your app is not working on my device.
Would you mind if I use your code in order to develop an app suitable for my specific device?
Click to expand...
Click to collapse
not at all.later I will give options for each user's path for brightness, screen timeout when the event wakes the screen (not all devices are ten seconds., etc

hi ..thanx i will try this i was searching for this .. but i found it works when the screen is on .. but it stop working when is off .. i hope it will work ..
and plz help the guys in the CM10.2 i think you know java so you can help them .. they have some problem with ril .. and big problem with vibration ... we need team to make cm works .. thanx again ...... peace
http://forum.xda-developers.com/showthread.php?p=47912182#post47912182

nanoteam said:
hi ..thanx i will try this i was searching for this .. but i found it works when the screen is on .. but it stop working when is off .. i hope it will work ..
Click to expand...
Click to collapse
try in terminal emulator
su
echo 1 > /sys/class/leds/button-backlight/brightness
(or any path for your device's brightness)
it should light the leds.
and then turn off the screen without pressing back or menu, (they light the leds)
if the leds keep lighted while the screen is off, then propably it will work. if not then the kernel restrictions apply to your rom.

beastaki23 said:
try in terminal emulator
su
echo 1 > /sys/class/leds/button-backlight/brightness
(or any path for your device's brightness)
it should light the leds.
and then turn off the screen without pressing back or menu, (they light the leds)
if the leds keep lighted while the screen is off, then propably it will work. if not then the kernel restrictions apply to your rom.
Click to expand...
Click to collapse
They keep on, but they don't get on, if the device is already locked.
Sent from my GT-I9105P using XDA Premium 4 mobile app

CoolDevelopment said:
They keep on, but they don't get on, if the device is already locked.
Sent from my GT-I9105P using XDA Premium 4 mobile app
Click to expand...
Click to collapse
This is why I keep the screen on for 11 seconds. this way when the event comes:
1. android lights the screen and the lights for 10 seconds (by default of android)
2. android ask them both to turn off (after 10 seconds) -
But the screen is still on as I asked. :good:
So a second later (11 seconds) I turn on the lights and release the screen. (turns off unless you unlocked it)
try not to interact with your phone if you want to test it since you receive the sms or the missed call, cause then the lights wont start. (since you already saw the event)

it worked for me but .. 1st the led they are not bright ... you can't see them clearly .... and they just stay tuned ..if you can make them blink good luck ....

I think you should check https://play.google.com/store/apps/details?id=neldar.bln.control.free&hl=de.
The soft key driver in our kernel sources is drivers/input/touchscreen/coreriver_touchkey/
The app is incompatibel with our device, but maybe something similar would be possible

BLN control this application needs feature enabled in the kernel ... you need to path the corect driver to support it i tried it ... ... this project it is better it uses libs ... i think there is app it uses lib like this ... but it work just when the screen is on .. it kills when is off .. but this app it work ... the problem it is not bright .. and it needs blink ..

nanoteam said:
BLN control this application needs feature enabled in the kernel ... you need to path the corect driver to support it i tried it ... ... this project it is better it uses libs ... i think there is app it uses lib like this ... but it work just when the screen is on .. it kills when is off .. but this app it work ... the problem it is not bright .. and it needs blink ..
Click to expand...
Click to collapse
here is an example, how the support for the app is added, but our device uses a complete different touchkey diver
https://github.com/dmore70/kernel-GB-I9000/commit/d69303cae38bf1f6efe36aceab492d9bb8bc0ac3
BTW I found a way to increase the brightness of the keys, while the device is locked and blinking leds would kill our battery

I will try add a handler to execute
echo 255 > /sys/class/leds/button backlight/max_brightness
after the screen is off. probably since the brightness is 1,
it will allow me to play with brightness level. and simulate blinks. I will try if it works later.
As always feel free to edit the code yourself!

beastaki23 said:
I will try add a handler to execute
echo 255 > /sys/class/leds/button backlight/max_brightness
after the screen is off. probably since the brightness is 1,
it will allow me to play with brightness level. and simulate blinks. I will try if it works later.
As always feel free to edit the code yourself!
Click to expand...
Click to collapse
I found the brightness values in kernel, the thing you want to do won't change anything i guess
Sent from my GT-I9105P using XDA Premium 4 mobile app

they wont kill battery if make them blink every 7 or 8 sec ... blink for have second .. stay off for 8 sec .. and blink ..
you meant you must change them in the kernel .. may be you can override setting

nanoteam said:
they wont kill battery if make them blink every 7 or 8 sec ... blink for have second .. stay off for 8 sec .. and blink ..
you meant you must change them in the kernel .. may be you can override setting
Click to expand...
Click to collapse
I maybe found a way to support bnl control
Sent from my GT-I9105P using XDA Premium 4 mobile app

if it works tell me ......good luck

CoolDevelopment said:
I found the brightness values in kernel, the thing you want to do won't change anything i guess
Sent from my GT-I9105P using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Yep. tried it but it wont allow changes. not even with screen on.

So now I could succesfully build kernel, now I'm hanging with modding our lights.goldfish https://github.com/CyanogenMod/android_device_generic_goldfish/blob/cm-10.2/lights/lights_qemu.c like https://github.com/neldar/liblights_gt-i8190/blob/master/lights.c . Maybe anyone of you can help me ?

CoolDevelopment said:
So now I could succesfully build kernel, now I'm hanging with modding our lights.goldfish https://github.com/CyanogenMod/android_device_generic_goldfish/blob/cm-10.2/lights/lights_qemu.c like https://github.com/neldar/liblights_gt-i8190/blob/master/lights.c . Maybe anyone of you can help me ?
Click to expand...
Click to collapse
Where can we find our official's kernel light file? Can you upload it? propably it has different inputs than those.

Related

[RC4][CAB][SRC]LedNotifications [minor update][03/04/2010]

NEW VERSION RELEASE CANDIDATE 4
NOTE: I DON'T HAVE ENOUGH TIME TO OFFER SUPPORT FOR THIS APP. I'M RELEASING THE SOURCE CODE UNDER GPLV3 LICENSE.
SCREENSHOTS CLICK HERE TO SEE
LedNotifications it's a event based application that will detect when some applications write in the notification bar and will raise a led event.
The app consists in a:
-background process (lednotifybkg.exe)
-configuration tool (LedNotifyGUI.exe)
Bakground process it's coded in C to maximice performance and memory consumption.Background process will trigger the led events so you don't need the configuration tool to be running.
The application it's now hardcoded so only works with HD2 devices.
How to use it
Just run the configuration tool. Now raise a notification (for example a misscall) and go to configure-> add last active notification. Now select the led and press Add. To ensure compatibility you'll only be able to configure the LAST ACTIVE NOTIFICATION. So if you have 3 notification, you'll be able to configure the last one. To configure the others rid of the last one and do the same again.
When you finish, start the background process. If it's started, shutdown it and start it again to apply changes.
PLEASE SHUTDOWN THE CONFIGURATION TOOL WHEN FINISH WITH THE EXIT BUTTON OR THE BATTERY CONSUMPTION MAY BE INCREASED
Warning: The background process will not start automatically.You should start it when your device it's reset.
SOURCE CODE
I'll release the source code when I get positive feedback indicating that the application has no bugs.Just to release something in good conditions. I'm not a software developer so don't expect too much.
THANKS TO...
MichyPrima for the ManilaSDK
NetRipper for LeoExtendedNotifications source code
WARNING: INCOMPATIBILITIES
To raise an event I delete a registry value that saves the id of the active notification. Concretely HKEY_LOCAL_MACHINE\System\State\Shell\Notifications\Active value ID. If you experience any problem with other notification software it can be related with this. Disable my app, make a soft reset and check if the issue has been solved.
MUST READ
I've made an effort coding this application, ensuring it has no bug and fixing it. So now I'm asking you if you like the application please donate to some ONG (ie http://www.supportunicef.org/), so I've helped you with this app, you can help other people with your money . Now you've read this you know that the pword to open the file is donateong
KNOWN BUGS
a) When the bicolor led it's blinking if you rid off some notification maybe it won't shutdown. Please report if this happens to you, I don't know if I fixed it at all.
FAQ
What's the battery consumption?
The battery consumption it's 0!!. The led it's put in an automode so the application it's not responsible of making the on/off process, the app just triggers leds on/off
Why I can't configure led's frequency and duty cicle?
To ensure maximum battery performance the led it's put in an automode. The driver is the responsible to blink the led so you can't configure it. You can still download previous versions but they consume battery power.
Why have you changed the Add apps menu?
With the new system I can't monitor all notifications so I've coded this way to ensure notifications you add will raise an event in the background process.
Why don't you use the netRippers code to blink the keypad?
Because I don't know howto put in automode and this affects battery performance
What's the password for the file?
Please read MUST READ section
DOWNLOAD RC4 SOURCE CODE
DOWNLOAD AUTOSTARTUP RC4 CAB
DOWNLOAD AUTOSTARTUP RC3 CAB
DOWNLOAD RELEASE CANDIDATE 3
DOWNLOAD RELEASE CANDIDATE 2
DOWLOAD RELEASE CANDIDATE 1 HERE
-----------------------------------------------------------------------------------------------------------------------------------------------------
OLD VERSIONS
Hello!,
I'm here to present my first windows mobile application LedNotifications. It's a general purpose led notifier but designed in an HD2 (so by now only works in an HD2).
The application looks for notifications in the notification bar and let's you to configure a led color. The led will start to blink as soon as the notification icon appears in the notification bar. There's a quicklist to enable/disable apps quickly. The app also lets you to override the power led.
There are some known bugs:
1)the configuration tools sometimes crashes.
2) Slide reported that sometimes the app doesn't work in stanby mode, if anybody knows what the reason could be please write in this post
It will let you configure led email notifications on the HD2!
Use at your own risk, I'm not responsible for the damages that this program can cause to you or/and your device.
Background program can crash and run CPU as high as 90% so if this happens it will drain your battery.I've been working on that so I expect this not to happen but it's a possibility.
Configuration files allow you to use in other devices. Format text files are
on.txt -> configuration to bring led on
off.txt -> configuration to turn the led off
so every file has LED_ID,LED_STATUS_VALUE
in HD2 green led is 1 and on status is 1
on.txt looks like this 1,1
I hope you like the program. I will post the source code soon.
The program does not register to startup so a reset will disable it (and solve any problem related to this)
Lots of thanks to MichyPrima for the manila controls
showthread.php?t=566188
Regards,
Jordi
(OLD) Last BETA version LedNotifications003.zip (OLD)
(OLD) DOWNLOAD IT HERE (OLD)
Changelog
31/03/2010 rc3 Solved power led always going green afeter a notification.
Solved bad management of notification. Led was not turned of after rid of the notification.
Solved OverridePowerLed issue
Solved some GUI crashes
30/03/2010 rc2 When you set OverridePowerLed and you rid of a notification, the led goes to its original state
30/03/2010 New background with no power consumption, completely event based. Based on NetRipper's LeoExtendedNotifications code.
21/03/2010 Improved power consumption up to 60%. Improves your battery life
20/03/2010 Fixed bug that did'nt turn off the led after you rid o the notification. Some improvements on the led code. Now the led behaviour it's more similar to the one you see in the configuration tool.
17/03/2010 I've changed the app name to LedNotifications to avoid legal issues. There's a led control app for BB that it's called LedNotifier.
Very interesting!
really interesting ..will check the memory usage.
antoniomistretta said:
Very interesting!
Click to expand...
Click to collapse
Thank you!!
karaern said:
really interesting ..will check the memory usage.
Click to expand...
Click to collapse
The app has two executables. One for the GUI and the other for the background. The background process manages leds and it coded in C++. Only around 70kbyte of memory and around 1% CPU . The GUI it's about 2Mbyte but it can be shutdown once you have configured it.
Will be watching this with exteme interest!
Interesting....keeping an eye on it.
kenkiller said:
Interesting....keeping an eye on it.
Click to expand...
Click to collapse
+1
Olioaglio
Hi htcjordi!
Thanks for the program. I am testing it on my Topaz. It seems to be working perfectly so far. I love the interface.
Many thanks! I will report any bugs I find.
I have a link from the start menu to this so it auto starts after a reset.
So far not too bad... Occasionally the led stays on but otherwise i finally have my flashing email notification
Well done!
Hi! Very interesting application you made there.
I think it would be even more interesting if the 2 settings txt files would be replaced by registry entries.
Thanks for the good work!
I have been testing this for about a day now. I received an email but the LED was not responding. When I woke up my device, the LED illuminated and stayed illuminated even after I removed all notifications and my TD2 was not charging.
It would be nice to be able to configure the different notifications with different LEDs. I haven't figured out how to do this yet.
Otherwise, it is great.
please
we want nimbuzz to notify us when we have a missed call or massage
because there is noway i can know if i have a missed call or massage
can you make your app work also with nimbuzz ? like what you did woth palringo ?
Aqrab said:
please
we want nimbuzz to notify us when we have a missed call or massage
because there is noway i can know if i have a missed call or massage
can you make your app work also with nimbuzz ? like what you did woth palringo ?
Click to expand...
Click to collapse
If you read the about tab in the GUI, this gives instructions on how to do this.
mitsi said:
If you read the about tab in the GUI, this gives instructions on how to do this.
Click to expand...
Click to collapse
yeah but the problem is nimbuzz does not have a notification icon bar
THATS WHY IM ASKING HERE
NO RESPOND FROM NIMBUZZ SITE
EpiphanyNL said:
Hi! Very interesting application you made there.
I think it would be even more interesting if the 2 settings txt files would be replaced by registry entries.
Thanks for the good work!
Click to expand...
Click to collapse
Actually it was easier to do with registry entries but I did it with text files because I think it's more friendly to work with text files than work with the registry. Just in case somebody want to write new files! Anyway I apreciate your comment
mitsi said:
I have been testing this for about a day now. I received an email but the LED was not responding. When I woke up my device, the LED illuminated and stayed illuminated even after I removed all notifications and my TD2 was not charging.
It would be nice to be able to configure the different notifications with different LEDs. I haven't figured out how to do this yet.
Otherwise, it is great.
Click to expand...
Click to collapse
Hi mitsi! I figured out that you have a Diamond, I can't test my app with this machine but I'll try to help you.Did your TD2's leds work through the configuration menu? I mean the menu you can configurate led's frequency and duty cicle. If the led is not blinking you'll have to play with configuration files.
You can configure notifications with different leds. Raise some event in the notification bar to list some app in the app menu. Then activate the app pressing the on/off button : it should appear a menu indicating wich led you want to turn on (in my case green/orange). If different physical leds are avaliable (not one with many colors) they should appear with indepentents on/off buttons.
Thank you for all your feedback
Aqrab said:
please
we want nimbuzz to notify us when we have a missed call or massage
because there is noway i can know if i have a missed call or massage
can you make your app work also with nimbuzz ? like what you did woth palringo ?
Click to expand...
Click to collapse
Hi Aqrab this software works only with the notification bar.I've playing with Nimbuzz and only plays a sound on notifications!!!! I've playing with talkonaut also and the same but at least vibrates.
Aqrab said:
yeah but the problem is nimbuzz does not have a notification icon bar
THATS WHY IM ASKING HERE
NO RESPOND FROM NIMBUZZ SITE
Click to expand...
Click to collapse
If Nimbuzz does not respond I can't do much more . I recommend you to use Palringo instead
How is work going on this?
I seem to keep getting an instant where by the flashing LED stays solid when i get rid of the notification (by reading the email).
I have currently set up a shortcut to the GUI so i can stop/restart it but it's a bit annoying... any chance you can add a restart into the script after the notification is removed?
PS its a HD2....
crispy514 said:
How is work going on this?
I seem to keep getting an instant where by the flashing LED stays solid when i get rid of the notification (by reading the email).
I have currently set up a shortcut to the GUI so i can stop/restart it but it's a bit annoying... any chance you can add a restart into the script after the notification is removed?
PS its a HD2....
Click to expand...
Click to collapse
I'll work on it this weekend. There's a trick to avoid that: get rid of the notification when the led is off.
htcjordi said:
I'll work on it this weekend. There's a trick to avoid that: get rid of the notification when the led is off.
Click to expand...
Click to collapse
easier said than done will practice my timing!
crispy514 said:
easier said than done will practice my timing!
Click to expand...
Click to collapse
Stop practicing! I've fixed the bug

Touch key brightness

Hey all, I'm trying to figure out how to get some brightness settings for the touch key brightness to stick. I've used LG 2x Notifications and O2x Touch Key Brightness, and they both work up until the point where i put the phone to sleep by tapping the power button. As soon as I wake it up, the brightness goes straight to zero unless i head back to the app and raise it up again. And if i uninstall the apps, the brightness on my keys stay off until i re-flash or reinstall the app again. Help!
My issue is a little different but similar. It worked fine for me on every basic gingerbread rom, but when I switched to a cm7 based rom the lights change with the brightness of the screen. I turned off all the light notifications but it did not help.
If anyone has any ideas, I'd love to hear them.
What rom?
Sent from my LG-P999 using XDA
redmonke255 said:
What rom?
Sent from my LG-P999 using XDA
Click to expand...
Click to collapse
On SinghUI but it doesn't have built-in LED notifications, if that's what you're getting at.
If the setting from one of those apps doesn't stick, then it's most likely being set by your ROM or Kernel. Have you tried checking if you get the same issue with other ROMs?
@jcbofkc That's a built-in setting that can't really be changed unless you get a custom ROM or Kernel cooked up to remove the link between the brightnesses.
xBIGREDDx said:
If the setting from one of those apps doesn't stick, then it's most likely being set by your ROM or Kernel. Have you tried checking if you get the same issue with other ROMs?
@jcbofkc That's a built-in setting that can't really be changed unless you get a custom ROM or Kernel cooked up to remove the link between the brightnesses.
Click to expand...
Click to collapse
90% sure the ROM doesn't have built in notifications. I'm noticing now that very rarely the settings do stick. Perhaps there is a way to force the app to stay in memory?
rrroach said:
90% sure the ROM doesn't have built in notifications. I'm noticing now that very rarely the settings do stick. Perhaps there is a way to force the app to stay in memory?
Click to expand...
Click to collapse
That wouldn't work. All that those apps do is write a number from 0-20 to the text file:
/sys/devices/platform/star_touch_led/wled
in your root file system.
When you read the file, it shows you the current output to the LEDs (from 0uA to 2000uA).
When you write to the file, it interacts with the Kernel and sets the brightness.
The Touch Key Lights type apps, all they do is when you move the slider they write a value to that file, and that's it. The only reason it wouldn't stick is if your ROM or Kernel is changing the value in the background. For example it will set it to 0 when you turn the screen off, and then it should set it back to wherever it was before when you turn the screen on again.
The closest you could get is to take the source for LG Touch LED Notifications and modify it to set the brightness every few seconds or something, but that probably wouldn't be too good for your battery life.
Based on your symptoms it appears that either your ROM or your phone doesn't really handle the modifying of the brightness very well. It looks like SinghUI does use a kernel from CM7, so I don't think your kernel is the problem. I'd suggest flashing the most recent CM7.2 RC, and seeing if you have the same problem there. CyanogenMod will change your LED brightness based on your screen brightness though.
EDIT: Ignore all that for a moment, try this first. It is a post from January 21st in the SinghUI thread, so it might not work now, but go ahead and try it: http://forum.xda-developers.com/showpost.php?p=21652744&postcount=293
Also I'd suggest posting in the SinghUI thread as everyone there is using your ROM, so they might be able to help better.
xBIGREDDx said:
That wouldn't work. All that those apps do is write a number from 0-20 to the text file:
/sys/devices/platform/star_touch_led/wled
in your root file system.
When you read the file, it shows you the current output to the LEDs (from 0uA to 2000uA).
When you write to the file, it interacts with the Kernel and sets the brightness.
The Touch Key Lights type apps, all they do is when you move the slider they write a value to that file, and that's it. The only reason it wouldn't stick is if your ROM or Kernel is changing the value in the background. For example it will set it to 0 when you turn the screen off, and then it should set it back to wherever it was before when you turn the screen on again.
The closest you could get is to take the source for LG Touch LED Notifications and modify it to set the brightness every few seconds or something, but that probably wouldn't be too good for your battery life.
Based on your symptoms it appears that either your ROM or your phone doesn't really handle the modifying of the brightness very well. It looks like SinghUI does use a kernel from CM7, so I don't think your kernel is the problem. I'd suggest flashing the most recent CM7.2 RC, and seeing if you have the same problem there. CyanogenMod will change your LED brightness based on your screen brightness though.
EDIT: Ignore all that for a moment, try this first. It is a post from January 21st in the SinghUI thread, so it might not work now, but go ahead and try it: http://forum.xda-developers.com/showpost.php?p=21652744&postcount=293
Also I'd suggest posting in the SinghUI thread as everyone there is using your ROM, so they might be able to help better.
Click to expand...
Click to collapse
Thanks for the link. It turns out that the ROM does have led notifications. However, disabling them didn't help the problem. :/ the g2x has just been an awful experience for me! :/

[Q] wake up screen when notification arrives

hi, there is an app or a mod\tweaks that allow to turn on the screen (without unlock) when a notification arrives and when the screen turns off (after 5/6 seconds) the led continue to blink until the notification will read?? I use ROM based on 4.2.2. I found SCREEN NOTIFICATION (on play store) works but... when the screen turns off the LED stop to blink!!!!:crying:
thanks for the advice! :fingers-crossed:
mattisekk722 said:
hi, there is an app or a mod\tweaks that allow to turn on the screen (without unlock) when a notification arrives and when the screen turns off (after 5/6 seconds) the led continue to blink until the notification will read?? I use ROM based on 4.2.2. I found SCREEN NOTIFICATION (on play store) works but... when the screen turns off the LED stop to blink!!!!:crying:
thanks for the advice! :fingers-crossed:
Click to expand...
Click to collapse
I know there's options in Tweaks when you have a custom ROM on a rooted phone. However, give this a whirl! It's completely free from the play store: look up SMS WakeUp it sounds like what you're looking for, not sure if it does the notification light like you wanted, but i'd imagine it would. I haven't posted more than 10 posts here, otherwise I'd post the link here.
Let me know if it works.
With Tasker you can do that, I think, in Secure Settings plugin there is an option to wake up the screen, and as I remember, there is also a function to let the led blink.
Sent from my HTC Sensation using xda app-developers app
LeMuecke said:
With Tasker you can do that, I think, in Secure Settings plugin there is an option to wake up the screen, and as I remember, there is also a function to let the led blink.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
yes with the tasker, ok, but... the passage to set the right profile to do that? tasker isn't simple to use, i'm not able, I've arleady try, unsuccessful :crying:
can you show me the complete passage?
imthatkiid said:
I know there's options in Tweaks when you have a custom ROM on a rooted phone. However, give this a whirl! It's completely free from the play store: look up SMS WakeUp it sounds like what you're looking for, not sure if it does the notification light like you wanted, but i'd imagine it would. I haven't posted more than 10 posts here, otherwise I'd post the link here.
Let me know if it works.
Click to expand...
Click to collapse
There isn t any ROM tweaks. And SMS wakeup doesn t let the led blinking when the screen turn off.
Profile is activated when notification comes in, then if Screen is off -> Secure Settings Screen on, wait 5 seconds and Notify LED. Maybe you can add something that the Notification will be deleted when read. This is just created on my mind, if I knew how to export a profile I will try to do one for you
Sent from my HTC Sensation using xda app-developers app
Thanks!

[Q] Control touch key backlight effectively?

Hi all It might not sound wise but I just got myself an second hand Infuse 4G for a nice price, and like every device I've owned, got CM running on it in hours. However, there's something that bugs me for a bit, and that is the touch key backlight.
On other devices I have, CM's Settings-Buttons part controls touch key backlight well, leaving it on for whatever duration or turning it off. But on all ROMs I've tried till now (CM10, CM10.2, CM11), either this option is absent (CM10's Infuse Settings is incomplete), or the option doesn't work properly:
1) When I set the keys to light up, they don't light up automatically when I wake the phone up from sleep, I'll have to press the keys to activate them.
2) When I turn the light off, the light indeed goes off immediately, but when I press any of the keys, they come back to life again and simply stay on, ignoring the settings.
I remembered that on many HTC phones there was a way to manually control button backlight behavior by altering values of a certain file in /sys/class/..., so after some work, I found the file: /sys/devices/virtual/misc/melfas_touchkey/brightness, and indeed, setting it to 0 will make the light go off. The thing that doesn't work out is that it won't persist - pressing any of the keys still make the light come back. I've set the permission to 0444 and even made a init.d script for that, and I can guarantee that the script itself is working properly, but still it can't keep the light under control... And now I'm stuck.
1) Is there a way to make the option in Infuse Settings or Settings-Buttons work as they should?
2) Any separate app that could also do this?
3) Why won't my manual adjustment persist?
Answering any of these questions would be of help, thank you in advance!
AndyYan said:
Hi all It might not sound wise but I just got myself an second hand Infuse 4G for a nice price, and like every device I've owned, got CM running on it in hours. However, there's something that bugs me for a bit, and that is the touch key backlight.
On other devices I have, CM's Settings-Buttons part controls touch key backlight well, leaving it on for whatever duration or turning it off. But on all ROMs I've tried till now (CM10, CM10.2, CM11), either this option is absent (CM10's Infuse Settings is incomplete), or the option doesn't work properly:
1) When I set the keys to light up, they don't light up automatically when I wake the phone up from sleep, I'll have to press the keys to activate them.
2) When I turn the light off, the light indeed goes off immediately, but when I press any of the keys, they come back to life again and simply stay on, ignoring the settings.
I remembered that on many HTC phones there was a way to manually control button backlight behavior by altering values of a certain file in /sys/class/..., so after some work, I found the file: /sys/devices/virtual/misc/melfas_touchkey/brightness, and indeed, setting it to 0 will make the light go off. The thing that doesn't work out is that it won't persist - pressing any of the keys still make the light come back. I've set the permission to 0444 and even made a init.d script for that, and I can guarantee that the script itself is working properly, but still it can't keep the light under control... And now I'm stuck.
1) Is there a way to make the option in Infuse Settings or Settings-Buttons work as they should?
2) Any separate app that could also do this?
3) Why won't my manual adjustment persist?
Answering any of these questions would be of help, thank you in advance!
Click to expand...
Click to collapse
As far as I know, the Infuse hasn't had effective backlight control since Gingerbread. If you wanna go back to that, it should work fine. Otherwise, all of the newer ROMs are using an outdated kernel that doesn't support backlight control. I highly doubt we will see it working again since very few people are still using the Infuse.
niral7 said:
As far as I know, the Infuse hasn't had effective backlight control since Gingerbread. If you wanna go back to that, it should work fine. Otherwise, all of the newer ROMs are using an outdated kernel that doesn't support backlight control. I highly doubt we will see it working again since very few people are still using the Infuse.
Click to expand...
Click to collapse
I can bear returning to GB and I did, but I've tried both stock UCLB3 and CM7, and neither contains any settings about button backlight...
Sent from Google Nexus 4 @ CM11
[WARNING: XDA Premium 4.0.13 lacks Signature function - do not update]
AndyYan said:
I can bear returning to GB and I did, but I've tried both stock UCLB3 and CM7, and neither contains any settings about button backlight...
Sent from Google Nexus 4 @ CM11
[WARNING: XDA Premium 4.0.13 lacks Signature function - do not update]
Click to expand...
Click to collapse
The Infuse supports backlight control in gingerbread. In order to use it, you'll have to download a third party app in the play store. I don't think CM7 will support it either.
niral7 said:
The Infuse supports backlight control in gingerbread. In order to use it, you'll have to download a third party app in the play store. I don't think CM7 will support it either.
Click to expand...
Click to collapse
Not even CM7? No dice then, I guess... Thanks for the tip anyway.
Sent from Google Nexus 4 @ CM11
[WARNING: XDA Premium 4.0.13 lacks Signature function - do not update]

Is there any way to flash / blink the camera LED on call / ring / sms ?

Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried Flashlight Notifier but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked....
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
BaLLZaCH said:
Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried FLASHLIGHT NOTIFIER but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked.... (Flashlight Alerts is purchase also and again, I'm afraid to try since nothing free came even close to working correctly)...
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
Click to expand...
Click to collapse
Did you check out all the options xposed framework has to offer?
BaLLZaCH said:
Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried FLASHLIGHT NOTIFIER but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked.... (Flashlight Alerts is purchase also and again, I'm afraid to try since nothing free came even close to working correctly)...
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
Click to expand...
Click to collapse
You want it to flash as often as the notification led or just once when the initial notification comes in?
Sent from my HTC6525LVW using Tapatalk 2
dottat said:
Did you check out all the options xposed framework has to offer?
Click to expand...
Click to collapse
I didn't see anything in the XPosed world, any suggestions to search for ?
runandhide05 said:
You want it to flash as often as the notification led or just once when the initial notification comes in?
Sent from my HTC6525LVW using Tapatalk 2
Click to expand...
Click to collapse
Well, just flashing on the original incoming call would be great.
In a perfect world mirroring the notification LED, at incoming call, on voicemail, sms and text all would be nice but all I really want is to flash while the phone is ringing....
BaLLZaCH said:
I didn't see anything in the XPosed world, any suggestions to search for ?
Well, just flashing on the original incoming call would be great.
In a perfect world mirroring the notification LED, at incoming call, on voicemail, sms and text all would be nice but all I really want is to flash while the phone is ringing....
Click to expand...
Click to collapse
I plan on working on some stuff this weekend, I'll add it to my list of things to look into, I know the leds can be controlled via a init like we did on the xoom's charging light.
Sent from my HTC6525LVW using Tapatalk 2
runandhide05 said:
I plan on working on some stuff this weekend, I'll add it to my list of things to look into, I know the leds can be controlled via a init like we did on the xoom's charging light.
Sent from my HTC6525LVW using Tapatalk 2
Click to expand...
Click to collapse
Awesome, that would be cool...
I know zero about Android code, but in my head it's just something like:
----------------------------------------------------------------------------------
On Rintone_Activate call Flashing_Timer
On Ringtine_DeActivate (Halt Flashng_Timer | Camera_Flash_OFF )
Module Flashing_Timer (
:Loop
Camera_Flash ON | Wait 1,1
Camera_Flash OFF | Goto Loop
)
----------------------------------------------------------------------------------
BaLLZaCH said:
Awesome, that would be cool...
I know zero about Android code, but in my head it's just something like:
----------------------------------------------------------------------------------
On Rintone_Activate call Flashing_Timer
On Ringtine_DeActivate (Halt Flashng_Timer | Camera_Flash_OFF )
Module Flashing_Timer (
:Loop
Camera_Flash ON | Wait 1,1
Camera_Flash OFF | Goto Loop
)
----------------------------------------------------------------------------------
Click to expand...
Click to collapse
So... Quite a funny outcome here...
So unless you write an app including permission to access torch, if torch is turned on in anyway (outside of an app with permission) the screen turns off...
So what I did was wrote a nice little script to monitor when /sys/class/leds/green/blink so when it's set to 1 /sys/class/leds/flash_0/brightness is echo > 200 for 500ms (half a second) then echo 0 > /sys/class/leds/flash_0/brightness . However because of what I have found when that does happen the screen goes black for a second while torch is flashing.
Il keep working on it to see if I can get something a little more usable.
Still having an issue monitoring /green led
Sent from my HTC6525LVW using Tapatalk 2
---------- Post added at 08:37 PM ---------- Previous post was at 08:19 PM ----------
ok so this is what ive come up with for the time being, since i see no foreseeable way around the screen flash issue, and there for dont see a point in dedicating more time to this.
download tasker.
create a new profile.
select event
select file
select file modified
type
Code:
/sys/class/leds/green/blink
then back out and create a task.
label it what ever you'd like
press the + and select code
select Run Shell
in the command field type
Code:
echo 200 > /sys/class/leds/flash_0/brightness
the check the box next to Use Root
back out and click the play icon bottom left, this will prompt you to allow su access.
all done, now in the phone settings under sounds and notification select what app light notifications you want to use, and whenever the green light changes from on or off status the torch will flash once.
runandhide05 said:
So... Quite a funny outcome here...
So unless you write an app including permission to access torch, if torch is turned on in anyway (outside of an app with permission) the screen turns off...
So what I did was wrote a nice little script to monitor when /sys/class/leds/green/blink so when it's set to 1 /sys/class/leds/flash_0/brightness is echo > 200 for 500ms (half a second) then echo 0 > /sys/class/leds/flash_0/brightness . However because of what I have found when that does happen the screen goes black for a second while torch is flashing.
Il keep working on it to see if I can get something a little more usable.
Still having an issue monitoring /green led
Sent from my HTC6525LVW using Tapatalk 2
---------- Post added at 08:37 PM ---------- Previous post was at 08:19 PM ----------
ok so this is what ive come up with for the time being, since i see no foreseeable way around the screen flash issue, and there for dont see a point in dedicating more time to this.
download tasker.
create a new profile.
select event
select file
select file modified
type
Code:
/sys/class/leds/green/blink
then back out and create a task.
label it what ever you'd like
press the + and select code
select Run Shell
in the command field type
Code:
echo 200 > /sys/class/leds/flash_0/brightness
the check the box next to Use Root
back out and click the play icon bottom left, this will prompt you to allow su access.
all done, now in the phone settings under sounds and notification select what app light notifications you want to use, and whenever the green light changes from on or off status the torch will flash once.
Click to expand...
Click to collapse
Thanks for taking a stab at it, I will try it out in a few days if I ever get a chance...

Categories

Resources