Background:
The Moto X 2 (2014) has a LED hidden under the earpiece. It is normally only used to indicate charging. (This is similar to the Nexus 6, but the Moto 2014 LED is just green, the Nexus seems to have a color LED too).
On rooted devices the LED can be turned on by writing a value to a system file:
echo <brighness> >/sys/class/leds/charging/brightness
(<brighness> some value betweeen 1 and 255)
The LED can be activated using the LightFlow app (see thread here: http://forum.xda-developers.com/moto...-2014-t3007091)
Here are instructions for the Tasker app (which allows more flexible control over the LED):
1) Create a Tasker task "Led On If Screen Off"
Task-Type "Code>Run Shell," Use Root "on", Command "echo 64 >/sys/class/leds/charging/brightness", IF %SCREEN equals off
(the number 64 is the brightness, it can technically run from 1 [dim] to 255 [battery consuming])
2) Create a task named "Led Off"
Task-Type "Code>Run Shell", Use Root "on", Command "echo 0 >/sys/class/leds/charging/brightness"
3) Create a Profile named "Notify Led On"
Task-Type "Event>UI>Notification", Owner Application "*" (or any you may like) and assign it to task "Led On If Screen Off"
3) Create a Profile named "Notify Click Led Off"
Task-Type "Event>UI>Notification Click", and assign it to task "Led Off"
and/or
4) Create a Profile named "Screen On Led Off"
Task-Type "Event>UI>Display>Display On", and assign it to task "Led Off"
Violá ... Tasker will turn on the LED if the display is off and a notification arrives. (of course other triggers like "State>Battery" can also be linked to the "Led On" task).
Enjoy
The Moto X 2 (2014) has a LED hidden under the earpiece. It is normally only used to indicate charging. (This is similar to the Nexus 6, but the Moto 2014 LED is just green, the Nexus seems to have a color LED too).
On rooted devices the LED can be turned on by writing a value to a system file:
echo <brighness> >/sys/class/leds/charging/brightness
(<brighness> some value betweeen 1 and 255)
The LED can be activated using the LightFlow app (see thread here: http://forum.xda-developers.com/moto...-2014-t3007091)
Here are instructions for the Tasker app (which allows more flexible control over the LED):
1) Create a Tasker task "Led On If Screen Off"
Task-Type "Code>Run Shell," Use Root "on", Command "echo 64 >/sys/class/leds/charging/brightness", IF %SCREEN equals off
(the number 64 is the brightness, it can technically run from 1 [dim] to 255 [battery consuming])
2) Create a task named "Led Off"
Task-Type "Code>Run Shell", Use Root "on", Command "echo 0 >/sys/class/leds/charging/brightness"
3) Create a Profile named "Notify Led On"
Task-Type "Event>UI>Notification", Owner Application "*" (or any you may like) and assign it to task "Led On If Screen Off"
3) Create a Profile named "Notify Click Led Off"
Task-Type "Event>UI>Notification Click", and assign it to task "Led Off"
and/or
4) Create a Profile named "Screen On Led Off"
Task-Type "Event>UI>Display>Display On", and assign it to task "Led Off"
Violá ... Tasker will turn on the LED if the display is off and a notification arrives. (of course other triggers like "State>Battery" can also be linked to the "Led On" task).
Enjoy
Aucun commentaire:
Enregistrer un commentaire