Tuesday, May 31, 2016

Solution: Enable Breathlight Notifications for Third Party Apps

Hi,

i was really annoyed by not having a Status LED on this phone and digged into this. First i tried Setting the Battery level to something below 15 to make the Breathlight come on but as soon as a system Battery update was triggered the Light went off ... Next: Created a App to send a fake SMS to my phone (triggering the SMS_RECEIVED intend) - failed to get it running, needs to be a prviliged system app (priv-app), gave up on this ... looked into the sys interface ... and tadaaa:

Code:

cat /sys/class/breathlightdrv/breathlight/rgb
gave me "this rgb has four parameter R_level G_level B_level mode" ... so lets try this ...

Switching the light full on (steady)
Code:

echo "255 255 255 0" > /sys/class/breathlightdrv/breathlight/rgb
Switching the light full on (pulse)
Code:

echo "255 255 255 1" > /sys/class/breathlightdrv/breathlight/rgb
Switching the light full off (= dark steady)
Code:

echo "0 0 0 0" > /sys/class/breathlightdrv/breathlight/rgb
now with this info and Tasker you can add your Breath Notification to e.g. K9 Mail Events, i have to look into tasker to catch e.g.Whatsapp, Threema etc incoming Messages events to notify with a nice pulsing Breathlight :)


from xda-developers http://ift.tt/25zkaVM
via IFTTT

No comments:

Post a Comment