Last active
August 29, 2015 14:14
-
-
Save mikeyjk/b9c1bc4709d757d740b0 to your computer and use it in GitHub Desktop.
Silent Mode for Android Lollipop (requires root access and Tasker application)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disable = shell("chmod 044 sys/class/timed_output/vibrator/enable", true, 0); | |
enable = shell("chmod 777 sys/class/timed_output/vibrator/enable", true, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can't figure out a good way of invoking it.
Currently the way I am doing this is on any notification being received:
If %SILENT eq vibrate
// suppress vibrate
Else
// enable vibrate
The issue is that there is a race condition between the vibrating notification and the shell chmod command (and the notification will win every time).
I could always just set a timer to check every 2 minutes, or have a widget. But neither of those are very fun!
I haven't googled extensively so this could already have a resolution.
Source: http://a3nm.net/blog/android_cli.html