Hi Martin,
I want to be able to type in the number of minutes I want the screen to be on and then pass it to the flow.
Can we please (also) have a variable input for this?
I understand that many devices do not support wide range of values for screen timeout, but it's good to have an option.
Thanks
ACTION - Set Screen Timeout - variable input
Moderator: Martin
- Automagician.gaurav
- Posts: 15
- Joined: 25 Aug 2017 18:13
ACTION - Set Screen Timeout - variable input
Thanks for reading this post.
- Gaurav
Automagician, India
- Gaurav
Automagician, India
Re: ACTION - Set Screen Timeout - variable input
It is android limitation. There is little benefit implementing it, as it mostly won't work.
The better solution it to create it by our own. Just use a Glovar Date/time as the reverter. You can set any minutes timeout as you want.
In the set timeout, set it to 24 hours or any longest screen timeout before "never". Then use script to set a glovar date/time to the timeout you want, example 2 hours (120 minutes)
Then create another flow, use trigger glovar date/time, use this global_reset_timeout as the variable. The action only to set the timeout back to the original you want, example 2 minutes.
The better solution it to create it by our own. Just use a Glovar Date/time as the reverter. You can set any minutes timeout as you want.
In the set timeout, set it to 24 hours or any longest screen timeout before "never". Then use script to set a glovar date/time to the timeout you want, example 2 hours (120 minutes)
Code: Select all
global_reset_timeout = addMinutes(getDates(), 120);
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: ACTION - Set Screen Timeout - variable input
Hi,
You can also try to set a custom timeout by using action Set System Setting, Category: System, Name: screen_off_timeout, and a value in milliseconds (e.g. 60000 for one minute).
Please note that some devices ignore custom values. Some devices also switch the setting back to one of the official values as soon as the system settings UI of the device is opened.
Regards,
Martin
You can also try to set a custom timeout by using action Set System Setting, Category: System, Name: screen_off_timeout, and a value in milliseconds (e.g. 60000 for one minute).
Please note that some devices ignore custom values. Some devices also switch the setting back to one of the official values as soon as the system settings UI of the device is opened.
Regards,
Martin
- Automagician.gaurav
- Posts: 15
- Joined: 25 Aug 2017 18:13
Re: ACTION - Set Screen Timeout - variable input
Thanks Martin I appreciate your help.Martin wrote:Hi,
You can also try to set a custom timeout by using action Set System Setting, Category: System, Name: screen_off_timeout, and a value in milliseconds (e.g. 60000 for one minute).
Please note that some devices ignore custom values. Some devices also switch the setting back to one of the official values as soon as the system settings UI of the device is opened.
Regards,
Martin
Thanks for reading this post.
- Gaurav
Automagician, India
- Gaurav
Automagician, India
- Automagician.gaurav
- Posts: 15
- Joined: 25 Aug 2017 18:13
Re: ACTION - Set Screen Timeout - variable input
Thank you, this does promise a stable workflow. I'll try it.Desmanto wrote:It is android limitation. There is little benefit implementing it, as it mostly won't work.
The better solution it to create it by our own. Just use a Glovar Date/time as the reverter. You can set any minutes timeout as you want.
In the set timeout, set it to 24 hours or any longest screen timeout before "never". Then use script to set a glovar date/time to the timeout you want, example 2 hours (120 minutes)Then create another flow, use trigger glovar date/time, use this global_reset_timeout as the variable. The action only to set the timeout back to the original you want, example 2 minutes.Code: Select all
global_reset_timeout = addMinutes(getDates(), 120);
I saw your list of important posts, loved it. Thanks a lot for putting it so much effort.
Thanks for reading this post.
- Gaurav
Automagician, India
- Gaurav
Automagician, India