Button LED notifications - Samsung Galaxy SL i9003

Currently LED notifications don't work as expected because when the device goes in deep sleep LEDs are automatically turned off.
To prevent this, I removed this line (XDA_Bam kernel sources)
The state of the LEDs is controlled by services.jar when the device is awake and it automatically switches them off when the screen is turned off (or keep them on if there's a notification with a simple patch).
I applied this change a month ago or so and my battery life didn't change, the device goes into deep sleep (it doesn't matter if LEDs are on or off) and my LEDs behave as always when the screen is on.
If you want to enable LED notifications for missed calls, follow this.
EDIT:
To make it clear: this is not BLN (BacklightNotification), you won't be able to use the apps on the market. To use those apps, you need to do other changes here and there (basically you need to port BLN), but that's enough for me. All I wanted to have were reliable and not power hungry LED notifications.
(I already posted this on XDA_Bam's thread time ago, but it's not something strictly related to his kernel, so I preferred to open a new thread).

Thank you for working in BNL

Is there developer who will include Dhiru's kernel changes to stock GB rom so that we can have bln mod in kernel itself??? I am glad at least 2 developers (loSconosciuto & dhiru) has shown interest in bln mod

BLN on stock rom has different implementation. BLN is supported natively in CM9.

That was simply a way to prevent LEDs from being turned off. In this way apps like lightflow can be used without problems. That's why I didn't title this thread "BLN mod".
Buttons are completely controlled by services.jar on stock roms, so, for an extremely basilar implementation, "this change+CM liblights+services.jar mod" was enough for me to enjoy reliable LED notifications.
(don't call me dev, dhiru is a dev, I'm simply an advanced user)

Just for completeness, if you want to enable LED notifications for missed calls too:
Phone.apk -> com/android/phone/NotificationMgr.smali
look for "Landroid/app/Notification;->contactCharSeq:Ljava/lang/CharSequence;" and add the red part:
Code:
iput-object v5, v9, Landroid/app/Notification;->contactCharSeq:Ljava/lang/CharSequence;
[COLOR="RED"]iget v11, v9, Landroid/app/Notification;->flags:I
or-int/lit8 v11, v11, 0x1
iput v11, v9, Landroid/app/Notification;->flags:I
iget v11, v9, Landroid/app/Notification;->defaults:I
or-int/lit8 v11, v11, 0x4
iput v11, v9, Landroid/app/Notification;->defaults:I[/COLOR]

Perfect like always.. good job mate

Sorry for a noob question. But how exactly am I supposed to use this? I mean i have seen this feature in some custom roms but right now Im on stock. Can you explain me how to set it up plz?

aamir said:
Sorry for a noob question. But how exactly am I supposed to use this? I mean i have seen this feature in some custom roms but right now Im on stock. Can you explain me how to set it up plz?
Click to expand...
Click to collapse
First of all, you need CyanogenMod liblights: flashable zip
This will let apps use softkeys as notification LEDs.
If you want LEDs always on, even when the CPU is in deep sleep, you need a custom kernel with the change I talked about in the OP: UC v15 is the only one I think.
Then, if you want reliable notifications, you need a modded services.jar. I made it for KPU and mznk for DDLF2 (here there's also a modded Phone.apk for missed call notifications).

Related

[Q] Difference between CMLed and BLN?

I just flashed Oxygen 2.3.2 (with Oxygen stock kernel) and it has a handy device sub menu where you have some control over back light notification (back light timeout and blinking)
BLN mod is not installed according to the BLN control app, and NStools shows the same. I'd assume this means the mod is not implemented into the kernel.
NSTools does however have a sub menu entitled 'CMLed' which I can acsess (with back light timeout and blinking options, same as in the Oxygen devices menu). And this is what I'm wondering...
Whats the difference between CMLed and BLN? Are they separate implementations of the same idea?
Sorry for the long winded post, hopefully someone can clear this up for me.
caffeinegum said:
I just flashed Oxygen 2.3.2 (with Oxygen stock kernel) and it has a handy device sub menu where you have some control over back light notification (back light timeout and blinking)
BLN mod is not installed according to the BLN control app, and NStools shows the same. I'd assume this means the mod is not implemented into the kernel.
NSTools does however have a sub menu entitled 'CMLed' which I can acsess (with back light timeout and blinking options, same as in the Oxygen devices menu). And this is what I'm wondering...
Whats the difference between CMLed and BLN? Are they separate implementations of the same idea?
Sorry for the long winded post, hopefully someone can clear this up for me.
Click to expand...
Click to collapse
I have been wondering the same thing.
BLN is the original backlight notification, made by Neldar.
CMLed was made by Cyanogenmod team not too long ago.
They're pretty much the same in terms of usage though.
So we can customize the blinking and everything with cmled? I'll have to give it a try..
Sent from my Nexus S using Tapatalk

app suggestion .. using back and menu buttons as noticication LED

coming from htc legend and xperia mini, the led notification lights was an important feature, now i really miss it in the note, and using noled app is not the same as having actual led lights.
so i was thinking if there is a possibility to use the menu and back buttons lights as notification light ? i found that they are separate from the screen light .. so can this be done by an app or a custom rom or it can't be done ?
This idea has already been implemented for many Samsung devices. Just find a custom kernel with "BLN" Support (BackLightNotification) and then download the app (info HERE) and away you go.
Hope that helps mate
Sent from my white Galaxy Note, using Tapatalk
ages_devil said:
coming from htc legend and xperia mini, the led notification lights was an important feature, now i really miss it in the note, and using noled app is not the same as having actual led lights.
so i was thinking if there is a possibility to use the menu and back buttons lights as notification light ? i found that they are separate from the screen light .. so can this be done by an app or a custom rom or it can't be done ?
Click to expand...
Click to collapse
check bLED
after i posted this i found out about bLED and bln kernel (i didn't know what bln means) thanks for your help
There is also noLED. Not one i use but you might aswell know all the options
I've read that they all hurt battery life
i tried noLED but i didn't like it
i know that bln might drain the battery faster but it's important for me, and maybe with further development some of the current problems might be fixed
NoLed is good, doesn't require root and only uses about 3% battery when enabled (and nothing if you switch it off). You can also customize the settings for additional power saving and I managed to get it down to 1% by setting the notification to flash on and off.
My only issue with NoLed is that from time to time it gives me the sleep of death. Disable it And my issues go away - haven't had time to test whether or not SoD is down to the power saving settings.

Touchkey backlight behavior

I've been digging into the "touchkey backlight issue" and would appreciate some help understanding how it worked (or didn't) on GB-based ROMs. If you are running GB (rather than "I remember..."), understanding how the proprietary Samsung code handled the backlight, both in auto- and manual-brightness mode, under a variety of screen timeouts, USB plugged, AC plugged, etc., would be great. Information like this can also help me guess where Samsung has their proprietary code, rather than wading through 150 MB of ROM.
Reports like,
The backlights go out after a couple seconds
Click to expand...
Click to collapse
aren't terribly helpful.
The backlights turn on when I tap the screen anywhere, then turn off after a second or two (it seems to vary from time to time), when I'm running on batttery, with auto-brightness on, and in normal indoor home lighting. They don't turn on with the same settings if I am outside.
Click to expand...
Click to collapse
or the like is much more helpful.
(I made that stuff up. I don't remember how they worked under GB.)
Oh, let me know which ROM you are running as well.
No promises, but knowing where we came from can help determine where we might go.
Thanks!
P.S. This is a common problem with Samsung phones -- You'd be amazed at the number of inquiries about the touchkey backlight.
I can check these later again a stock S4G I have still on GB, but on my flashed one with FB's AOKP using your brightness for the screen fixes, this is what I just tested.
-Turn Autobrightness off, screen sleep to 5 mins, brightness about 30%, backlights stay on for the whole 5 mins.
-Turn Autobrightness off, screen sleep to 5 mins, brightness about 100%, backlights stay on for the whole 5 mins.
Turn Autobrightness On, screen sleep to 5 mins, filtered/raw 34/34, backlights stay on for the whole 5 mins.
Turn Autobrightness On, screen sleep to 5 mins, filtered/raw 2000/2000, backlights go out as soon as the raw value hits past 150, your default to turn them off.
When I remove it from a bright light and the raw goes back down to below 50 though, the autobrightness does not dim the screen, I have to put it to sleep and wake it up to get it to actually drop the brightness..
Moving the phone between bright light and dim light, the buttons do go on and off corresponding to the 150, but the screen doesn't dim or go brighter.
If the buttons are off from being in bright light, and I press one, they go on and stay on and moving out and back into bright light, they seem to stay on most of the time.
So it seems your code for the autobrightness can turn the buttons on and off, by the 0 value for the correct RAW value. It's spotty though and the autobrightness doesn't adjust itself to the correct level until I sleep/wakeup again. I can have autobrightness on and move my phone from dark to light and the buttons go on and off by the brightness of the light but the screen doesn't.
I will check this same test against a stock GB and see what happens.
This is for gingerbread:
Sometimes the key lights don't turn on at all while using the keyboard, and even when you are pressing keys in the keyboard. It might not even be caused by the keyboard being out, maybe it's the way I hold my phone while I'm typing that causes the auto brightness to go down.
This doesn't occur all the time though. Also, sometimes it doesn't turn on at all even when touching the screen (maybe for a minute) then they turn back on.
It seems that the key lights have some situations where they decide to ignore touches and stay off, I'm still trying to figure out when this is. Again, it mostly happens when the keyboard is out. Maybe it has something to do with auto brightness. When toggling auto brightness on and off, the key lights immediately turn off and stay off for about 30 seconds. This makes me think that the soft key lights even on stock are buggy
Thanks getochkn; great report for ICS!
That pretty much agrees with what I am seeing on ICS and what I would expect from the code.
The buttons "don't play nice" with the Android world as it seems they turn themselves on when you touch them (probably hardware control), and the present TeamAcid ICS driver turns them on when it (re-)initializes. The Android world won't change the brightness of any of the "lights" if it thinks that the level is already set. For example, if it thinks the buttons are off, it won't try to turn them off again. I believe this is why with auto-brightness on the buttons sometimes won't turn off. I'm still wading through PowerManager service to understand how the code is trying to handle them when in "manual" brightness mode.
Definitely looking forward to your results for GB, though pisherthefisher's report that they seem "buggy" on "stock" for him suggests that Samsung might not have gotten it right even there.
Seems to be no way to fully disable them eh? Then we could just use the JB style nav bar like already in FB's AOKP which lets us set color, brightness, custom icon, etc but with the other buttons still working physically, lights on or not, it seems not worth it as you will still hit the sammy buttons, especially if the light is off but the buttons still physically work.
I can "hack" them off, but I'm trying to solve the problem more generally and in a way that keeps the TeamAcid framework able to easily track the CyanogenMod upstream. I might build a "Hefe Kernel Of Darkness" if I can't find something this week.
Posted from my SGS4G, thanks to Team Acid development
Ah. Might be an option, go all softkeys via the ROM instead.
I know OT, but any idea why the autobrightness doesn't seem to fully kick in sometimes either? I can be in the custom screen to view the raw values and see the numbers drop but not the screen brightness until i sleep/wakeup. The backlights will go on/off according to the raw value but not the screen brightness. lol.
Going to go see how my stock one works and I'll report back.
On the auto-brightness not seeming to work, you might want to check the auto-brightness thread in the dev section. I am guessing it might be related to the "Allow light decrease" and "Decrease hysteresis" settings.
jeffsf said:
On the auto-brightness not seeming to work, you might want to check the auto-brightness thread in the dev section. I am guessing it might be related to the "Allow light decrease" and "Decrease hysteresis" settings.
Click to expand...
Click to collapse
Thanks. I forgot the settings after reinstall.
On GB, the lights seem to go out at some value (no custom, can't tell) but do come back on when you press them and then seem to stay on randomly. lol.
FB's AOKP comes with BLN control which does seem to use the lights as an indicator light for lockscreen notifications, so they seem to be able to be controlled from that SW. Not sure if that helps or not?
Hefe kernel of darkness sounds awesome, it would be cool to use the sgs4g like a galaxy nexus
Setting the backlights to 0 on all light settings, the backlights go out, but as soon as you go to sleep, and wake up, the lights come back on and don't go out even though the custom panel shows the state of them at 0. Turning auto-brightness off/on then turns the lights off, so the state is not being restored at wake. Of course touching one of them turns them on and they stay on again unless i toggle off/on again.
Yes, right now driver resume turns on the backlights, but Android thinks they are already off, so it doesn't turn them off based on the auto-brightness settings. Touching the keys is similar, but it seems to be hardware that is turning them on.
Posted from my SGS4G, thanks to Team Acid development
Well I'll test a darkness kernel if you get one going. lol. Use the softkey feature in AOKP. I've already been playing with and have it setup, I just don't want to hit the sammy buttons which I brush sometimes by accident, nor have the lights come back on after wake up, so if can disable them fully in the kernel, that would be cool.
Hefe Kernel Of Darkness in Post #2 of the Hefe Kernel thread
jeffsf said:
Hefe Kernel Of Darkness in Post #2 of the Hefe Kernel thread
Click to expand...
Click to collapse
no wifi. lol. Doesn't even turn on.
Yeah, something is flaky. I'll look at it again tonight.
Posted from my SGS4G, thanks to Team Acid development
jeffsf said:
Yeah, something is flaky. I'll look at it again tonight.
Posted from my SGS4G, thanks to Team Acid development
Click to expand...
Click to collapse
Works good other than that.
Can the lights be disabled with the keys functional?
Sent from my SGH-T959V using xda app-developers app
m4127440 said:
Can the lights be disabled with the keys functional?
Sent from my SGH-T959V using xda app-developers app
Click to expand...
Click to collapse
The best we can do right is only have them turned on while pressed with the hefe kernel of darkness. Check out the hefe kernel thread in the development section, second post
Sent from my SGH-T959V using xda app-developers app
We?

BLN support which kernel + ROM? confirm working BLN

may i know what kernel and roms combination for i9505 for bln control app to work?
none that i know off
I don't think any .. not really needed when you have a multi colored led light (or even the flash) that you can configure for various notifications.. look at light manager or light flow.. Why would you need bln?

Best kernel/tool for working notifications?

Guys, i'm fed up with notifications working sloppy on my 6. Sometimes the phone doesn't ring when a notifications pops up, even tough it's in RING mode, sometimes it doesn't show notifications at all. Adaptive battery and deep optimization are off. And the important apps have "Don't Optimize" as well.
What can i do to have notifications work all the time? I'm getting enough of my phone's refusal tantrum.
xXx magisk rom helps some with this.
Custom roms helps some.
I'm not 100% sure.. But I also think Smurf kernel made some edits that might counter it aswell (more than just zram to try to keep apps in BG)
Im on liquid remix + smurf atm and I don't have any issues with notifications.
But I didn't have such bad experience with oos either. Some Twitter + Instagram notifications, but that's all basically
I hesitate using custom ROMs cause i really like the default one. But if this continues, i'm forced to change. This is unacceptable.

Categories

Resources