Timer

Post your questions and help other users.

Moderator: Martin

Post Reply
Akt
Posts: 133
Joined: 25 May 2014 08:57

Timer

Post by Akt » 16 Jul 2019 06:02

In this countdown flow, is there any possibility of making an option of custom in input dialogue.

Eg:-
6 min
12 min
18 min
30 min
Custom

On click of custom button it should ask for time for countdown.


http://automagic4android.com/flow.php?i ... de3fecd28a

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

Re: Timer

Post by Desmanto » 16 Jul 2019 06:18

Yes, just add new element to the choice list as "Custom". Then use expression to check after the operation == "ok",

Code: Select all

value == "Custom"
True, then go to input dialog to enter the time or maybe string input that can be evaluated to time. Use another expression to check if that input is valid time or duration.

As for the count down, since you are going to do long operation until countdown end, it is better to use widget and show widget instead. You can use script to modify the widget text to show current countdown time. Hide the widget after finish. Remember to increase the AES number, since you are going to do high element execution per minute.
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.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Timer

Post by Rafi4 » 16 Jul 2019 06:43

hi Akt
I think this flow will consume more battery. use global variable date and time instead.

from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Timer

Post by Akt » 16 Jul 2019 08:35

Hello Desmanto and Rafi4

Thanks for your reply.

Please can you make corrections in the flow and post it as i am very weak in writing script.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Timer

Post by Rafi4 » 16 Jul 2019 12:09

hi Akt
In create timer flow create Shortcut . click on shortcut select which you want.
In timer schedule flow add actions which you want. these flows don't need widgets. hope these flows will fulfill your needs.

from record4
Attachments
Timer.xml
timer schedule
(7.03 KiB) Downloaded 714 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Timer

Post by Akt » 16 Jul 2019 12:36

Thanks Rafi4
It's working and you solved my problem.

Post Reply