[MOD] Use the backlight botton for NOTIFICATIONS...

Search This thread

fredphoesh

Senior Member
Jan 15, 2009
1,062
86
please no OT petition requests

Hey!
If you guys really really want the MOD, let's do something about it. AND I NEED ALL SUPPORT FROM EVERYONE.

Read Carefully.

I'm not sure if you've heard of PSX emulator or not.


Guys, this is a bit annoying, the last 3 pages of this thread taken over by something that is totally OT... some (like me) would call it spam!

Please do not Hi-jack threads to promote your cause, it's not good forum manners and is against XDA rules.

I'm very interested in this notification backlight thing, sounds like it would be a GREAT addition... thanks to those of you that are working on that!
Tx
Mark.
 

dex1701

Senior Member
Sep 29, 2007
506
66
The town of Chi
Signed! I hope, it will be very soon!=) If you need testers, I'd like to be the first=)

I'd like to politely request that people stop posting "signed" in this thread. I keep coming back thinking there's actually something happening here, when really it's just people posting "signed."

It would be a lot more useful to add a poll to the OP rather than filling up the thread with "signed."
 
May 2, 2010
46
0
I'm glad someone is already working on this. The idea came to me yesterday when I got my Samsung Vibrant for TMobile. I was looking for an LED notification light and realized the phone didn't have one. Major bummer. I'm hoping this could be an app. I don't really want to root my new phone. I have no problems with rooting. I have a rooted G1.
 
Last edited:

madmack

Senior Member
Ok, I've tampered with different files to try to activate the backlights of our capacitive buttons.. I had two previous android phones, I was able to do that task in both phones by modifying a file called "brightness" to include numbers (0 for off, 1 or 255 for on) to get the backlights of these LEDs to turn on and off.

The naming scheme and "brightness" file is usually easy to find by browsing through /sys/class and figuring out what folder corresponds to which device. I think the biggest candidate we have here is melfas-touchkey. Even though someone else tried to cat that file to see what it contained with no luck (Samsung might've protected them with some other method that am not familiar with, given that I couldn't cat it even with root), I actually was able to overwrite values to these files by simply echoing 0 or 1 to the file. We probably cannot read the file, but perhaps we can write to it? That however, didn't get the lights on but I think we're close.

I also ran a search in all subdirectories under /sys/class for "brightness" files and catted them all to see their values and effects. I was able to get the screen turn on and off by changing the values in "brightness" under the lcd directory.

I will keep playing around with these folders and post any findings here.

What we could also do is run a program that monitors file access on these directories/subdirectories and see what files get modified when the LEDs get turned on.

I also want to warn you guys that I had a friend who used his capacitive button's backlight as notifications and his lights went off after about a month of use. I think we should be cautious to the time values we set these LEDs to turn on/off to, they are simply not made to flash or blink continuously for prolonged periods.


Lets get this going !
 

madmack

Senior Member
Found a bug in the drivers that might be useful.


if you cat /sys/devices/virtual/misc/melfas_touchkey/touch_version while the phone's screen is off and then go ahead and touch one of the capacitive buttons, they'll light up and stay that way until you wake the screen up. dmesg is flooded with "touchkey is not enabled.W" which I only found to exist in cypress-touchkey.c

I tried echoing numbers to enable_disable and brightness after that step to no avail. Although it might be worth mentioning that dmesg prints the numbers I echo to brightness. For example, "echo 255 > brightness" will give a dmesg "touch_led_control: 255"


I'm done for the day, will appreciate if anybody has any input on this. :)
 

teknx

Member
Jul 27, 2009
36
0
I also want to warn you guys that I had a friend who used his capacitive button's backlight as notifications and his lights went off after about a month of use. I think we should be cautious to the time values we set these LEDs to turn on/off to, they are simply not made to flash or blink continuously for prolonged periods.

This point should not be overlooked. I noticed on my vibrant that the capacitive light buttons are somewhat bright and I wouldn't be surprised if they get burnt out from overuse.

With that being said, I think once the button light issue has been figured out, the buttons should not light up all at once with the regular on and off pattern. A successive pattern from left to right for example would use less battery and hopefully avoid burning them out the lights compared to lighting them up all at one time in intervals. The successive pattern would also look much cooler in my opinion.

Thanks for the helpful info madmack and for keeping us updated.
 

madmack

Senior Member
Ok guys, I'm done playing around with the softkeys' backlight. I truly believe that the source code for the melfas-touchkey that samsung released to us is not identical to the one installed on our device (I know that because I'm running some commands as root that are supposed to give kernel output with dmesg but aren't), so I took a slightly different approach.

I saw the idea posted somewhere previously that instead of getting the capacitive lights on, we really should be putting the screen's AMOLED screen to work ! specially that it doesn't consume any backlight energy when displaying a black screen. So I developed an app that does just that, upon receiving an audio notification, it will display a black screen with a red dot somewhere in the left top corner. Ok, i really should put these in bullet points..

the application does the following:

1. When your phone sounds a notification, it switches the screen on and displays a red dot somewhere in the top left corner. The location of this dot is random every time you receive a new notification. This will guarantee using different LEDs so that the same ones won't be burned out ! The reason why I chose red is because it uses the least amount of energy to display.

2. The app runs as a service, after installing, you'll need to lock the screen once and unlock it for it to activate. After this, the application should run automatically after a reboot.

3. To get rid of the red dot, the only key you can use is the home key. Using the capacitive touch buttons will do nothing, and so as clicking anywhere on the screen. Once your screen turns on, the notifications disappear and will not come up until a new notification sound is received.

I have also logged the touch drivers and saw that although I'm displaying a black screen and setting flags to not respond to touch messages, android is still receiving touch messages when you touch any spot on the screen. This, I imagine, consumes resources! So I disabled the touch drivers when the black screen is active. Pressing on the Home button should reactivate it. If your screen is unresponsive to touch even after the notification screen is dismissed, a simple restart should take care of it. Once you've restarted, you can uninstall the app.

Now the touchscreen drivers were a lot easier to mess around with. The sourcecode given by samsung helped me achieve the activation/deactivation of the screen. Things are not the same with the capacitive buttons. You'll notice that when the black screen is on, if you touch any of the soft buttons, they'll light up (although am suppressing them programatically). Am still analyzing the drivers to see if there is an easy way to disable these drivers too when the notification is on.

One more note, make sure the notification sounds that you choose for your different apps (Calendar, Gmail, Gtalk.. etc) are the default samsung notifications or the ones you placed in /sdcard/sd/media/audio/notifications
Any other sound notifications will simply not trigger the program to display the notification screen.



I just want to let you guys know that this is a beta, better yet, an alpha release. Install it at your own risk.

Enjoy ! Comments and feedback will be appreciated :)
 

Attachments

  • FoldMod.apk
    11.1 KB · Views: 367
Last edited:

gTen

Senior Member
Feb 16, 2008
1,218
42
NICE! Thanks a lot! I was playing around with it on the Android emulator but don't have a device to test on so it makes it harder :(

As for suggestions, we made a few more in that thread about using the proximity sensor and light sensor to conserve energy when possible...also about letting the cpu idle..

But either way great job!

You should probably make a separate thread for it so more can see it and maybe get a sticky..
 

teknx

Member
Jul 27, 2009
36
0
Awesome job madmack. I never thought we would get an app like this so soon. It hasn't even been a week yet!

I think we need to do some extensive testing to see how much or little battery the black screen and 1 red dot uses. If it is very very minimal then maybe we can work with a few ideas to improve things in terms of presentation.

As far as testing goes, I think a good way to test it out would be to record the battery percentage before getting a msg, then have the black screen and red dot come up, and leave it there for an hour(or more, maybe even over night) and see how it affects the battery life.

Current bugs
- Does not work in vibrate mode


Suggestions
1. 1 dot for each missed message, they can be grouped together in a box like sequence so it is easy to count while the dots move to random positions on the screen.

2. Different color dots for different kinds of notifications i.e. calls. So for example, after the color red we would use the next color that drains the battery the least like blue for a missed call.

3. Keeping the random positions of the dots possibly within the first top 10 horizontal and vertical pixels , so as to give it a look of a real LED notification near the top of the phone. Hah, i just realize the super amoled screen is so black, from far away the red dot actually looks like a LED (awesome)

4. If battery life isn't too much of an issue, we can introduce periodic animations to get the user's attention better than a static dot.

5. Ensure compatibility with popular sms apps like Handcent and the No Lock app which allows people to bypass the lock screen after pressing the unlock button. (right now it seems to work with hand-cent okay)

what does everyone else think?