Different alarm clock depending on shift

Share and discuss your flows and ideas with other users.

Moderator: Martin

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Different alarm clock depending on shift

Post by tphg » 29 Jan 2018 10:06

Desmanto wrote:Basically this means, once you play a sound, you have no way to stop the sound. Kinda weird, but that's what happen. You can still try a lot of things, such as
- try to choose the built-in sound
- try with another type of sound file (mp3, wav, m4a)
- try disable all automagic permission, restart and reenable everything.
- maybe other method I have think about.

For current other method of workaround, you can :
- create notification and tap it to turn the volume off until the sound stop, restore the volume afterward
- choose a short sound file and loop it. Once you tap the notif, it will break the loop (stop the flow)
- Try to use Seek action sound, forward by so many seconds, see if it will jumps directly to the end of sound file (thus ended it).
@ Desmanto
Thank you for giving so many hints to overcome the problem.
I'm so busy at the moment but will try one by one in my free time.
Anyway, the sound I'm using for the flow is built-in one, mp3.
Sure I will try with all methods you gave then report to you later.
--------------------------------------------------------------------------

P/S: @ Desmanto
It's OK now after I tried with the 1st method of workaround you recommended: create notification and tap it to turn the volume off until the sound stop, restore the volume afterward. Thanks again for you help.
I also tried the 3rd option you gave about "Seek action sound" but no success.
Actually I used to use Google Keep for my daily task reminder instead of calendar as it is more friendly to use, but unfortunately Google Keep does not give notification sound on my phone, only notification on status bar (this problem also happened to my SMS notification). That's why I had to make a flow which play a long notification sound once there is a reminder task so that I wouldn't miss out.

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Different alarm clock depending on shift

Post by tphg » 09 Mar 2018 04:53

Desmanto wrote:Basically this means, once you play a sound, you have no way to stop the sound. Kinda weird, but that's what happen. You can still try a lot of things, such as
- try to choose the built-in sound
- try with another type of sound file (mp3, wav, m4a)
- try disable all automagic permission, restart and reenable everything.
- maybe other method I have think about.

For current other method of workaround, you can :
- create notification and tap it to turn the volume off until the sound stop, restore the volume afterward
- choose a short sound file and loop it. Once you tap the notif, it will break the loop (stop the flow)
- Try to use Seek action sound, forward by so many seconds, see if it will jumps directly to the end of sound file (thus ended it).
Based on your tips and referring to the other shared flow, I created a flow to generate a notification sound when there is notification of Google Keep' reminder displayed on status bar, as follows:
- Check if there is notification of reminder from Google Keep displayed on status bar.
- If yes, run the action for generating alarm sound.
- A dialog popup of "Single Choice Menu" appears asking user to confirm if user wants to see the reminder or not.
- If the user chooses "Yes" then open Google Keep app. Then adjust the notification volume to 0 for turning off the alarm.
- Put the phone into sleep in 22s (longer than the length of the alarm ringtone).
- Adjust the notification volume back to maximum.
It works as expected, except that there is annoying thing on the dialog popup.
This dialog popup appears several times although I confirm to see the reminder and Google Keep app opens.
I am a newbie so I think there should be something wrong in my flow that cause the popup repeats.
Below is the screenshot of my flow:

Image

And my flow:
flow_KeepNotification_20180308_141916.xml
(5.12 KiB) Downloaded 1032 times

drivingmapsaz
Posts: 1
Joined: 17 Nov 2017 04:04

driving directions

Post by drivingmapsaz » 09 Mar 2018 07:24

Thank you for sharing ! I hope everyone is having a great experience!
Already have an account that says this is a very beautiful and wonderful article! Lots of love for all
-driving directions

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

Re: Different alarm clock depending on shift

Post by Desmanto » 09 Mar 2018 14:33

@tphg : Oh, I don't know that you have put some extra info from last post. If the pop up dialog appear too many times during the nofitication, probably google keep remove and create the notification again during app opening, thus triggering the flow again and again. I remember ever facing this problem with certain app. You can see at the log, if the trigger got triggered how many times, or you can check statistic to see the number of trigger. If that is the case, you can protect your flow, simply by changing the FEP (Flow Execution Policy) to skip; thus only single execution allowed. Any additional trigger that triggered when the flow is executing will be ignored.
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.

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Different alarm clock depending on shift

Post by tphg » 09 Mar 2018 15:03

Desmanto wrote:@tphg : Oh, I don't know that you have put some extra info from last post. If the pop up dialog appear too many times during the nofitication, probably google keep remove and create the notification again during app opening, thus triggering the flow again and again. I remember ever facing this problem with certain app. You can see at the log, if the trigger got triggered how many times, or you can check statistic to see the number of trigger. If that is the case, you can protect your flow, simply by changing the FEP (Flow Execution Policy) to skip; thus only single execution allowed. Any additional trigger that triggered when the flow is executing will be ignored.
Oh, thank you so so so much, @Desmanto.
The problem was solved when I followed your instruction: I have change the FEP in flow option to "Skip execution when an instance is already executing".
Now the popup dialog appears only one time and no longer repeats.
-----------------------
P/S: Don't know why but now the flow doesn't give notification when the alarm time reaches until I open the phone's flip cover (I'm using flip cover with my phone as usual).
Since the first time, I added Automagic as well as Keep to the list of no battery optimization apps.
This problem still happened when I change the FEP back to original option.

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

Re: Different alarm clock depending on shift

Post by Desmanto » 09 Mar 2018 15:34

Do you update the ROM or android version? Make sure you tick the "Allow in device idle". MM 6.0+ above will delay the alarm if the device is in doze mode. The alarm won't get execute until the next maintenance windows, sometimes until the next screen on.
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.

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Different alarm clock depending on shift

Post by tphg » 09 Mar 2018 15:56

Desmanto wrote:Do you update the ROM or android version? Make sure you tick the "Allow in device idle". MM 6.0+ above will delay the alarm if the device is in doze mode. The alarm won't get execute until the next maintenance windows, sometimes until the next screen on.
No. I'm using Marshmallow and didn't update it for a long time as my LG G4 stops at Android 6.0. Sorry I couldn't find "Allow in device idle" in any of my triggers or actions.

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

Re: Different alarm clock depending on shift

Post by Desmanto » 09 Mar 2018 16:14

Oh, still the same phone. Which trigger got delayed? In this thread, I assume you are using trigger Calendar or Calendar Event. Both are time related trigger and will be delayed if not allowed in doze.
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.

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Different alarm clock depending on shift

Post by tphg » 10 Mar 2018 00:55

Desmanto wrote:Oh, still the same phone. Which trigger got delayed? In this thread, I assume you are using trigger Calendar or Calendar Event. Both are time related trigger and will be delayed if not allowed in doze.
I'm using the trigger "Notification on Status Bar Displayed" with the app Google Keep, not using Calendar Event.
I've tried with several options in my flow but so far problem still exists.

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

Re: Different alarm clock depending on shift

Post by Desmanto » 10 Mar 2018 04:07

Probably need to open new thread, so I don't mis-assume. But it is ok, I get it now. Just continue here.

What happen is something like this?
1. Google keep has notification
2. Flow not triggered
3. Unlolck the phone using flipcase
4. Flow triggered immediately

Try to uncheck and re-check again the notification access for Automagic. Sometimes it is checked, but the permission is denied. I have flow to log whatsapp notification that I activated on several occassion, so we still can read those deleted message before it get deleted. The notification still get logged even screen is off.
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.

Post Reply