[Help] Can't get profiles to get triggered by a clock alarm
Hey. I've been trying to have a bunch of tasks get triggered by my morning alarms. I'm using a Pixel 4a (5G) running the latest stock Android 11 (rooted) and the latest Google Clock (com.google.android.deskclock). I usually have a bunch of alarms with labels, so first I tried adding the labels to the events too, then also tried removing the labels from both the alarms and the events - neither of these works. I tried all the different alarm-related events in Tasker and none of them seems to work. Is this a bug, or am I missing something? Do I need to have another context for the profile to become active, or is just Alarm Clock/Alarm Done by itself enough? As suggested by other threads, I checked Preferences -> Monitor -> Use Reliable Alarms and mine is already set to When Off, although that might be unrelated since the phone, at least in the case of Alarm Done, is already awake (plus I don't need absolute precision - it'd be fine if the profile becomes active some time after that).
I know I can probably achieve this by hardcoding the time instead of linking it to the alarms, but I'd prefer having some flexibility.
Any suggestions are appreciated. Thanks in advance.
Posted Oct 14, 2021, 7:04 PM UTC
You could try this way...
An "Intent Received" event Profile (the intent:
android.app.action.NEXT_ALARM_CLOCK_CHANGED), (or "Alarm Changed" event [In this case You will not need the following mentioned action]).In linked Task use "Test Next Alarm" action (to get the next alarm time).
Set retrieved time to a "Time" context Profile.
The event will be received at every "Alarm Clock" change (when an alarm is added, removed or It's done).
Edit: "Alarm Changed" event never worked reliably on my devices, so I prefer the intent way.
This works for setting the time, but when the alarm goes off, it doesn't seem to retrigger the event. This would mean that I cant wipe the time value when the alarm goes off
Strange...It should fire even when the alarm goes off. I have a Profile using this intent and It's working fine (on two Samsung devices).
Here You will find the doc, If You are interested.
Good luck.
Maybe I need to try the intent instead of the built in profile trigger. Bc if that intent works I don't even need to set the variable, I can just have the alarm Intent as the trigger
Read my comment again please, I added soothing (doc link).
No, You can't, because the intent is received even if You add a new alarm.
OK I think that's it. Alarm Changed profile event will not capture the alarm going off, but the intent you suggested does