Page 1 of 1

Alarm Fired, Snoozed and Dismissed Triggers

Posted: 18 Sep 2017 14:16
by athooya
I would like to request "Alarm fired", "Alarm snoozed" and "Alarm dismissed" triggers.

When the alarm goes off, I manually dismiss it, then the "Alarm dismissed" is triggered.

It should NOT be triggered when I "dismiss" EARLY a set alarm before it goes off (that's deleting an alarm ... not the same thing).
It should only be triggered when it is dismissed at the time that the alarm has already sounded off.

Re: Alarm Dismissed Trigger

Posted: 18 Sep 2017 16:09
by Desmanto
Do you mean the alarm should happen and then you dismiss it, only then it triggers the flow? If that so, you can try Trigger General Broadcast : com.android.deskclock.ALARM_DISMISS if the clock is stock android. For other clock app, please match with the package name or corresponding broadcast.

Re: Alarm Dismissed Trigger

Posted: 18 Sep 2017 18:41
by athooya
The General Broadcast way does not work.

Re: Alarm Dismissed Trigger

Posted: 19 Sep 2017 03:49
by Desmanto
I still don't understand the difference between dismiss vs finish. You can try General broadcast : com.android.deskclock.ALARM_DONE . I 've tried at mine. Dismiss the alarm and the flow got triggered.

Alarm Fired, Snoozed and Dismissed Triggers

Posted: 25 Sep 2017 15:31
by athooya
The General Broadcast does not work for my phone and my friend's phone.

I found the "ClockTask" plugin that works. The plugin allows for setting an alarm and then has "Alarm Fired", "Alarm Snoozed" and "Alarm Dismissed" triggers that work on the set alarm.

It would be nice if Martin can do the same: build into Automagic these triggers for the "set alarm" action.
There is already a "Set Alarm" action in AM. There should be "Alarm Fired", "Alarm Snoozed" and "Alarm Dismissed" triggers for it.

I prefer to have them built-in in AM than to use a plugin or general broadcast.

Re: Alarm Fired, Snoozed and Dismissed Triggers

Posted: 25 Sep 2017 16:11
by Desmanto
What is your and your friend's phone? Non AOSP-ish ROM tends to use vendor's own clock app. That will cause the broadcast not sent.
A built-in function would work more reliable. But you need to wait until it is implemented.

@Martin : Here is the link to ClockTask, so you can check it out.

Re: Alarm Fired, Snoozed and Dismissed Triggers

Posted: 25 Sep 2017 16:37
by athooya
General Broadcast is not reliable.
That's why a request was made to have the triggers built-in.

Re: Alarm Fired, Snoozed and Dismissed Triggers

Posted: 12 Oct 2017 16:56
by niftea
+1
for all three triggers.

Re: Alarm Fired, Snoozed and Dismissed Triggers

Posted: 16 Oct 2017 16:30
by Desmanto
Found out something new. At my phone, the alarm clock is Clock (com.android.deskclock). When the alarm fired, dismiss or snoozed, it will make announcement to the system. Kinda like general broadcast, but more reliable.
Alarm fired : "Swipe right to dismissSwipe left to snooze"
Alarm snoozed : "Snooze"
Alarm dismissed : "Dismiss"

You can use Trigger UI Event, type Announcement. Filter the package to your alarm clock app, Text matches glob * (match everything). Put debug dialog.
Set your alarm one minute from now, wait until it is triggered and check the variable {text}. Try to snooze and dismiss it, and check the {text} also.
You can then use it as the trigger now.

Re: Alarm Fired, Snoozed and Dismissed Triggers

Posted: 19 Dec 2018 13:45
by akela
+1
Build in AM. No third-party plugin. No broadcast workaround.