Trigger Flashlight on
Moderator: Martin
Trigger Flashlight on
It would be useful to be able to count down after turning on the flashlight to turn it off again after X minutes, e.g. when it was turned on accidently, or when reading in the evening or putting the baby to sleep.
Re: Trigger Flashlight on
hi
this trigger is already available.
trigger = system setting changed
category = system
name = torch_light
variable = torch
condition = torch == 1; true;
add actions which you want to true branch.
any doubts please post?
welcome
this trigger is already available.
trigger = system setting changed
category = system
name = torch_light
variable = torch
condition = torch == 1; true;
add actions which you want to true branch.
any doubts please post?
welcome
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Trigger Flashlight on
This event is not created in every android, at least not at mine, RR 6.2.0 Oreo 8.1. I have checked the system setting and the LOS setting too, nothing change during the flashlight is on. Logcat only show some camera manager invoking the flashlight. No broadcast, no event created. But I can still use condition Flashlight on to check whether the flashlight is turned on.
So the only way to check it is using some periodic timer to check if the flashlight is on, then turn it off. But this is not the best. Maybe it is better just create a flow, which turn on flashlight and auto turn it off after several minutes. Next time, to use flashlight, create a shortcut to that flow and give it a flashlight icon.
So the only way to check it is using some periodic timer to check if the flashlight is on, then turn it off. But this is not the best. Maybe it is better just create a flow, which turn on flashlight and auto turn it off after several minutes. Next time, to use flashlight, create a shortcut to that flow and give it a flashlight icon.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Trigger Flashlight on
hi desmanto
this is working perfectly on my device Samsung Galaxy j2.
I am uploading flow. turn on flash light through Automagic or notification panel this flow is perfectly working. edit it as your needs
from record4
this is working perfectly on my device Samsung Galaxy j2.
I am uploading flow. turn on flash light through Automagic or notification panel this flow is perfectly working. edit it as your needs
from record4
- Attachments
-
- Light_off_20190115_055210.xml
- (4.09 KiB) Downloaded 882 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Trigger Flashlight on
Thanks! This goes way beyond my current experience. How do I know the variable is "torch"?
And is the attached flow then correct?
And is the attached flow then correct?
- Attachments
-
- Screenshot_20190115-091010.jpg (145.42 KiB) Viewed 18550 times
Re: Trigger Flashlight on
hi
In trigger you can find the variable "torch".
you may change it as you wish, if you named it as example
"light". change it in condition "expression" also as "light."
from record4
In trigger you can find the variable "torch".
you may change it as you wish, if you named it as example
"light". change it in condition "expression" also as "light."
from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Trigger Flashlight on
@Rafi4 : Your flow use trigger Glovar dt, I don't know why you need that. Probably you uploaded the wrong flow. Maybe it is system setting changed. But not all android provide this value change when flashlight is on, so it depends on the phone. To perform action on notification, the screen doesn't need to be on, nor the notif bar should be pulled down. So no need to turn screen on, pull down the notif. Simply directly perform action on notif.
@tempe222 : if your phone set the value after turn on flashlight, you can find it in system setting. Create another flow, add trigger, System Setting Changed, system. Add another two same trigger, choose secure and global. Add condition debug dialog after it. Enable the flow and Turn on the flashlight. If the value is set, you should debug dialog pop up. If not (mostly likely nothing), then the system doesn't provide you the value for flashlight. Disable the flow afterward, or you will get a bunch of popup later.
@tempe222 : if your phone set the value after turn on flashlight, you can find it in system setting. Create another flow, add trigger, System Setting Changed, system. Add another two same trigger, choose secure and global. Add condition debug dialog after it. Enable the flow and Turn on the flashlight. If the value is set, you should debug dialog pop up. If not (mostly likely nothing), then the system doesn't provide you the value for flashlight. Disable the flow afterward, or you will get a bunch of popup later.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Trigger Flashlight on
hidesmanto
thanks for your suggestion.
from record4
thanks for your suggestion.
from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Trigger Flashlight on
hi
- Attachments
-
- torch_20190116_055810.xml
- (2.82 KiB) Downloaded 862 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1