Modified timer option

Post your questions and help other users.

Moderator: Martin

Post Reply
Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Modified timer option

Post by Lucy » 25 Aug 2019 19:39

Is it possible to create a shortcut trigger to activate a timer that can be edited for when it runs out the flow then continues to do other actions? Im trying to create a sleep shortcur but i want to be able to manually set the time but without having to edit the flow

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Modified timer option

Post by Desmanto » 26 Aug 2019 18:40

I don't get exactly what you want. But it seems you want to set a custom timer, then after the timer reach the time, it execute a flow. Kinda like execute flow but with custom delay.

The easiest logic is to replace the time in the sleep with variable. You can then set the variable to any time you want. But this cause unnecessary wakelock, especially when you have sleep longer than 1 minute.

Better use Glovardt (Global Variable Datetime). The variable you can choose is the interval you want to add to current time and save it to glovardt. Create 2 flows, one is with input dialog to choose the interval you want. At the end of the flow, add the interval to current time and save it to glovardt. At another flow, use this glovardt as the trigger, and execute the main branch of your flow.
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.

Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Re: Modified timer option

Post by Lucy » 26 Aug 2019 20:19

Hmm... let me try clarify a little more..
-I want to create a flow to do some actions.
-I want the flow to be triggered by a shortcut.
These parts no issue, but as the first action after triggering the shortcut what i want is to have some sort of dialog appear to where i can then manually set a timer and when that timer depletes the flow continues the rest of the actions.
Is this any clearer?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Modified timer option

Post by Desmanto » 27 Aug 2019 04:01

Yes, that means i understood it correctly at first try :)
You can do as above. I have shared a very similar concept flow at here: http://automagic4android.com/forum/view ... f=3&t=7859

Even though it is for toggling state, but you can easily modify it to a execute flow with delay. Simply replace the bottom 4 actions. You don't need any toggling at the left, simply a notification is enough. Replace the right part with your main branch of the flow you want to execute after timeout
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.

Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Re: Modified timer option

Post by Lucy » 27 Aug 2019 07:29

Lol thats close enough i suppose to what i want, thank you.
Been messing around with it and i can definitely make it work to my likings😊... further edit: after a bit of editing its working a treat to what i need🤙

Post Reply