Jump to content


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

- - - - -

60 replies to this topic

#1
Timmmm

Timmmm

    Regular

  • Members
  • PipPip
  • 122 posts
  • Devices:T-Mobile Pulse (Huawei 8220)
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.

Attached Files


Edited by Timmmm, 09 January 2010 - 10:59 PM.


#2
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

View PostTimmmm, on Dec 16 2009, 22:43, said:

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?


#3
Shuflie

Shuflie

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,270 posts
  • Gender:Male
  • Location:Belfast
  • Devices:HTC One X
  • Twitter:@Shuflie

View Postrjm2k, on Dec 17 2009, 05:33, said:

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 Image

#4
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 32,883 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:Galaxy Nexus / TF Prime
  • Twitter:@paulobrien
Rename the zip to APK and install?

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#5
xangma

xangma

    Diehard

  • Members
  • PipPipPipPip
  • 402 posts
I just opened the zip I downloaded and it has an apk in it =/


#6
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 32,883 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:Galaxy Nexus / TF Prime
  • Twitter:@paulobrien
If you're on a Mac it sees the APK inside and unzips that too! ;)

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#7
rjm2k

rjm2k

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,096 posts

View PostShuflie, on Dec 17 2009, 09:41, said:

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.


#8
Shuflie

Shuflie

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,270 posts
  • Gender:Male
  • Location:Belfast
  • Devices:HTC One X
  • Twitter:@Shuflie

View PostPaul, on Dec 17 2009, 10:01, said:

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

P
That would explain it then ;)

Posted Image

#9
Timmmm

Timmmm

    Regular

  • Members
  • PipPip
  • 122 posts
  • Devices:T-Mobile Pulse (Huawei 8220)

View Postrjm2k, on Dec 17 2009, 05:33, said:

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.k...c6e58251521997f


#10
Shuflie

Shuflie

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,270 posts
  • Gender:Male
  • Location:Belfast
  • Devices:HTC One X
  • Twitter:@Shuflie
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 Image

#11
Timmmm

Timmmm

    Regular

  • Members
  • PipPip
  • 122 posts
  • Devices:T-Mobile Pulse (Huawei 8220)

View PostShuflie, on Dec 17 2009, 13:29, said:

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.


#12
Shuflie

Shuflie

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,270 posts
  • Gender:Male
  • Location:Belfast
  • Devices:HTC One X
  • Twitter:@Shuflie
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 Image

#13
bas-r

bas-r

    Enthusiast

  • MoDaCo Plus
  • PipPipPip
  • 187 posts
  • Gender:Male
  • Location:Netherlands
  • Devices:HTC Desire Z

View PostShuflie, on Dec 17 2009, 15:08, said:

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 ;)


#14
stupidm4n

stupidm4n

    Regular

  • Members
  • PipPip
  • 54 posts
  • Devices:pulse
love it, is it possible to just have the green and red flash, say green for sms and red for missed call


#15
xangma

xangma

    Diehard

  • Members
  • PipPipPipPip
  • 402 posts

View Poststupidm4n, on Dec 17 2009, 17:43, said:

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


#16
Bigsy

Bigsy

    Newbie

  • Members
  • Pip
  • 41 posts
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?


#17
bounty123

bounty123

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts
  • Gender:Male
  • Location:Budapest, Hungary
  • Devices:HTC One X

View Poststupidm4n, on Dec 17 2009, 18:43, said:

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!


#18
Timmmm

Timmmm

    Regular

  • Members
  • PipPip
  • 122 posts
  • Devices:T-Mobile Pulse (Huawei 8220)

View Poststupidm4n, on Dec 17 2009, 17:43, said:

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.


#19
Timmmm

Timmmm

    Regular

  • Members
  • PipPip
  • 122 posts
  • Devices:T-Mobile Pulse (Huawei 8220)
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!

Attached Files



#20
Bendolfc

Bendolfc

    Newbie

  • Members
  • Pip
  • 47 posts
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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users