Closed Gordalf closed 1 month ago
Hi.
Is it possible to use the power key
No.
would it then be possible to press volume up and volume down at the same time and turn on/off the flashlight?
Yes, you can write something like this:
Cool. That code works as intended. Last thing i promise. How do i incorporate the torch code with media controls?
Below is the code I want to use:
set -eu
# Up 300ms -> next track
# Down 30ms -> prev track
TO=0.300
DUR_S=25
WL_MAX=1500
on_up() {
read -t $TO key && {
volume music up
return
}
media next
vibrate $DUR_S
}
on_down() {
read -t $TO key && {
volume music down
return
}
media play_pause
vibrate $DUR_S
}
loop() {
while read key; do
wakelock acquire $WL_MAX
case "$key" in
"$PRESS_UP" )
on_up
;;
"$PRESS_DOWN" )
on_down
;;
esac
wakelock release
done
}
### Supported commands
DELIM="|+|"
vibrate() {
#
Thanks a lot. I will recommend your app to everyone i know who might be interested
Hi
First of all thanks for your awesome app. I have been looking for years for something like your app.
I have two questions.
Is it possible to use the power key to turn on/off flashlight?
If it isn't possible to use the power button - would it then be possible to press volume up and volume down at the same time and turn on/off the flashlight? There is an app which does just that but I am unable to use it since I run Grapheneos https://github.com/anselm94/Torchie-Android/
Also I would like to donate to the project - is that possible?