How To: Use Tasker to assign flashlight toggle to Active Key on S7 Active

kuaka

Senior Member
Nov 5, 2011
58
11
0
FL
Quick how to for any other S7 Active owners who like me were disappointed that the Active Key could not be used as a dedicated flashlight button.

I used the Tasker app with the free App Factory plugin to create an app that toggles the flashlight state.

1. Open Tasker and create a new task (I called mine Flashlight Toggle)
2. Click the Add action button (the + at the bottom) and the Select Action Category window will pop up
3. Type Torch into the filter at the bottom of the Select Action Category window
4. In the Action Edit screen select Toggle from the dropdown in Set
5. Press back to return to the Task Edit screen
6. In the lower right press and hold the icon button and assign the task an icon
7. Press back to return to main Tasker screen - press and hold on the Flashlight Toggle task (or whatever you called it) task to highlight it
8. Select Export from the menu button in the upper right and export as an app.
8a. You may need to install the apk you just created manually depending on permssion settings with tasker (thanks for heads up 78c10)
9. Now open Settings and Navigate to the Active Key settings
10. You should have an app named Flashlight Toggle that you can now assign to the Active Key

Congratulations, you now have a dedicated flashlight button on your S7 Active.
 

Attachments

Last edited:

bandario

Senior Member
Feb 1, 2011
435
143
63
Victoria
I personally can't believe you didn't get more feedback on this. What a beautiful, elegant solution.

I was shocked to find that there was no option available to bind a long press of the action key to flashlight, how stupid. You fixed it, and you fixed it in a beautiful way! Thanks.
 

78c10

Member
Jan 19, 2011
44
12
0
HTX
@Chr0nos77 I had done this previously, but was plagued with either apps that would then open and not turn off the torch by holding it, or having ads emblazoned across my device.

Smooth solution. The only thing that differed from the instructions is that after I exported the app, I had to install it before I could use it. So, I guess don't miss out on that step.

For some reason, I had to factory reset my phone to get the app factory to install. Oh well.
 
  • Like
Reactions: kuaka

bandario

Senior Member
Feb 1, 2011
435
143
63
Victoria
Only problem I'm having with this is that even though I have the app in my whitelist, if the phone is in deep doze the button does not reliably launch the flashlight. Have to press unlock button first then the active key. Still good but would be good if I could somehow force it to work with aggressive doze.
 

Jimmyvb98

Senior Member
May 5, 2016
217
155
43
22
Hillegom
Is there a way to set the flashlight to full brightness? When you turn on the flashlight in the notification panel, it's only set to 30% of it's brightness, but when you open the Activity Zone, you can turn it all the way up to 100%, is there some way to make the 100% setting standard?
 

dogg94

Senior Member
Jan 6, 2011
245
39
58
Wisconsin
Thank you for this, I've been looking for a way to be able to skip tracks with the active key and found a way to do it using the same logic you described here (made an app for next track and on for previous). If anyone is interested let me know and I'll put instructions for how I did it.
 

muneebrocks

Senior Member
Nov 7, 2010
509
64
0
Karachi
gotta say.. works VERY well :)
Quick how to for any other S7 Active owners who like me were disappointed that the Active Key could not be used as a dedicated flashlight button.

I used the Tasker app with the free App Factory plugin to create an app that toggles the flashlight state.

1. Open Tasker and create a new task (I called mine Flashlight Toggle)
2. Click the Add action button (the + at the bottom) and the Select Action Category window will pop up
3. Type Torch into the filter at the bottom of the Select Action Category window
4. In the Action Edit screen select Toggle from the dropdown in Set
5. Press back to return to the Task Edit screen
6. In the lower right press and hold the icon button and assign the task an icon
7. Press back to return to main Tasker screen - press and hold on the Flashlight Toggle task (or whatever you called it) task to highlight it
8. Select Export from the menu button in the upper right and export as an app.
8a. You may need to install the apk you just created manually depending on permssion settings with tasker (thanks for heads up 78c10)
9. Now open Settings and Navigate to the Active Key settings
10. You should have an app named Flashlight Toggle that you can now assign to the Active Key

Congratulations, you now have a dedicated flashlight button on your S7 Active.
I personally can't believe you didn't get more feedback on this. What a beautiful, elegant solution.

I was shocked to find that there was no option available to bind a long press of the action key to flashlight, how stupid. You fixed it, and you fixed it in a beautiful way! Thanks.
@Chr0nos77 I had done this previously, but was plagued with either apps that would then open and not turn off the torch by holding it, or having ads emblazoned across my device.

Smooth solution. The only thing that differed from the instructions is that after I exported the app, I had to install it before I could use it. So, I guess don't miss out on that step.

For some reason, I had to factory reset my phone to get the app factory to install. Oh well.
can anyone give me the apk that the app creator made?
 
  • Like
Reactions: 3arthur6

dedicha

Senior Member
Jun 5, 2013
86
11
28
Sofia
It does work on Oreo and not only for me, other users report it as well.
I have tried it, it just reordered the position of the icons, no mobile data toggle :(
Finally, success!
I read another command in the posts, that did the job!
Just put that command in the adb shell:

settings put secure sysui_qs_tiles "$(settings get secure sysui_qs_tiles),MobileData,Hotspot"

I have no idea why the first one did not do it and what exactly is the difference, but this command did it !
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone