Jump to content

App to flash the keypad lights when you receive a text.


Recommended Posts

Posted (edited)

Hello! As some people on here have noticed, the Pulse has no kind of notification LED. I have instead written an app to use the keypad backlight as a notification light.

Caveats:

* Requires root.

* Will not cure AIDs.

Possible in future:

* Detect missed calls

* Configurable flash patterns for different events?

* Better control over the flasher service, if I can be bothered.

* Instead of executing a su command, it would be better if everyone (Paul?) modified their custom ROMs to include the command

chmod 0666 /sys/class/leds/keyboard-backlight/brightness

in init.rc.

* Could someone make me a better icon? :-)

Enjoy!

Version 1.4 attached (it's inside the zip) I forgot to change the version number in the manifest I think so you may have to uninstall the old version first.

PulseLights1.4.apk.zip

Edited by Timmmm
Posted
Hello! As some people on here have noticed, the Pulse has no kind of notification LED. I have instead written an app to use the keypad backlight as a notification light.

Caveats:

* Requires root.

* Currently doesn't auto-start on boot - you need to run the app once each time you turn the phone on and then exit it.

* May be buggy. One time I used it the flashing was very erratic.

* Will not cure AIDs.

Possible in future:

* Autostart on boot (this is next on the list)

* Detect missed calls

* Configurable flash patterns for different events?

* Better control over the flasher service, if I can be bothered.

* Instead of executing a su command, it would be better if everyone (Paul?) modified their custom ROMs to include the command

chmod 0666 /sys/class/leds/keyboard-backlight/brightness

in init.rc.

* Could someone make me a better icon? :-)

Enjoy!

That's great Timmmm, any chance of a non-root version? Do you know if the lights can be controlled through the android api and therefore thru a java app rather than native?

Guest Shuflie
Posted
That's great Timmmm, any chance of a non-root version? Do you know if the lights can be controlled through the android api and therefore thru a java app rather than native?

Can you try using adb to see if you can issue the command that Timmm want in init.rc? On a more practical note is this program installed as a flash update through fastboot? I unpacked the zip and there is no .apk inside to install it with.

Posted

I just opened the zip I downloaded and it has an apk in it =/

Posted

If you're on a Mac it sees the APK inside and unzips that too! ;)

P

Posted
Can you try using adb to see if you can issue the command that Timmm want in init.rc? On a more practical note is this program installed as a flash update through fastboot? I unpacked the zip and there is no .apk inside to install it with.

I can try, however with the dec update I believe it's not possible to get root anymore and this app needs root.

Guest Shuflie
Posted
If you're on a Mac it sees the APK inside and unzips that too! ;)

P

That would explain it then ;)

Posted
That's great Timmmm, any chance of a non-root version? Do you know if the lights can be controlled through the android api and therefore thru a java app rather than native?

Unfortunately not. I did find some hidden Java methods:

PowerManager.isScreenOn() is useful.

and

PowerManager.setScreenBrightness(int) (or something like that).

however the latter sets both the screen and key backlights.

It seems that Android does support notification lights. I don't have time at the moment, but could someone see if creating the following symlink results in the desired behaviour:?

/sys/class/leds/button-backlight/brightness -> /sys/class/leds/keyboard-backlight/brightness

Also might be worth trying

/sys/class/leds/green/brightness -> /sys/class/leds/keyboard-backlight/brightness

This is the actual code that sets the light values: http://android.git.kernel.org/?p=platform/...c6e58251521997f

Guest Shuflie
Posted

Doesn't seem to do anything on my pulse, I use HandcentSMS as my messaging app, but even when I enable notifications in the default messaging app nothing lights up when I receive an SMS.

Posted
Doesn't seem to do anything on my pulse, I use HandcentSMS as my messaging app, but even when I enable notifications in the default messaging app nothing lights up when I receive an SMS.

Erm, it seems I accidentally removed the critical line the starts the actual service! D'oh! Fixed version attached to the original post.

Guest Shuflie
Posted

That seems to work, and I don't even need to the default notifications turned on ;) The flashing is a bit erratic, and seems to turn off and then back on again after a while, is that intentional?

Posted
That seems to work, and I don't even need to the default notifications turned on ;) The flashing is a bit erratic, and seems to turn off and then back on again after a while, is that intentional?

It's not a bug, it's a feature ;)

Guest stupidm4n
Posted

love it, is it possible to just have the green and red flash, say green for sms and red for missed call

Posted
love it, is it possible to just have the green and red flash, say green for sms and red for missed call

You're in it now Timmmm haha

Posted

Great little app, I look forward to improved versions ;)

Maybe get this pushed in to the custom rom, I mean who wouldn't want the option of doing this?

Guest bounty123
Posted
love it, is it possible to just have the green and red flash, say green for sms and red for missed call

I love this idea!

Posted
love it, is it possible to just have the green and red flash, say green for sms and red for missed call

Sadly not. There's only one logical light, even if it is made of multiple LEDs.

Posted

The version attached to this post might fix the erratic lights, and should autostart on boot.

Unfortunately I haven't tested it, because when I restarted my phone to test it, android (or huawei) crapped out *again* and it wouldn't boot. I have to say the reliability of this phone (or maybe android itself) leaves something to be desired.

Anyway, feel free to test it. Please let me know if it works properly now!

PulseLights1.2.zip

Guest Bendolfc
Posted

Hi,

Useful little app, can't believe something similar isn't built in. 1.2 doesn't seem to work for me, installs and starts ok but no flashing. The one in the first post works though.

Posted
Hi,

Useful little app, can't believe something similar isn't built in. 1.2 doesn't seem to work for me, installs and starts ok but no flashing. The one in the first post works though.

Yeah, doesn't work for me either. Not sure why. Can't fix it until after the new year unfortunately.

  • 2 weeks later...
Posted
Yeah, doesn't work for me either. Not sure why. Can't fix it until after the new year unfortunately.

Which device are you actually setting to do this?

/sys/class/leds/button-backlight

/sys/class/leds/keyboard-backlight

/sys/class/leds/jogball-backlight

/sys/class/leds/red/

/sys/class/leds/green

/sys/class/leds/blue

LIGHT_ID_NOTIFICATIONS

LIGHT_ID_ATTENTION

?

Guest David Horvath
Posted
Which device are you actually setting to do this?

/sys/class/leds/button-backlight

/sys/class/leds/keyboard-backlight

/sys/class/leds/jogball-backlight

/sys/class/leds/red/

/sys/class/leds/green

/sys/class/leds/blue

LIGHT_ID_NOTIFICATIONS

LIGHT_ID_ATTENTION

?

WE WANT THE SOURCE CODE ;) LOL Shared code development? :)

Guest Daniel Williamson
Posted

Hi,

So does the 1.2 update work ? a few people have said that it dosent so i might just stick with the current one.

Great job anyway :)

Dan

Guest Timmmm
Posted

1.2 doesn't work. I'll try to fix it and post the source code tonight, or tomorrow. I'm using keyboard-backlight. Android actually supports notification lights but it uses the red, green and blue devices. Sadly you can't symlink these to the keyboard-backlight. It might be possible to patch the kernel to make it work without modification though.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.