Originally Posted by Flechg
Hello everyone here is what I can do and what does not work.
* What works
Calendar Entry Profile -> Work
Then task -> Set ALARM AM 05 H 45
* What does not work is the reverse task if not working then disable alarm clock
Posting the profile and task (as described above) is always more illuminating. However, the inverse of that would just be not setting an alarm. If there's no calendar entry the alarm is not set. I'm still missing the problem. Is there a residual alarm that goes off without having been set through tasker?
I've been pondering and the only thing I can come up with is that you set an alarm and then the next day you set an alarm... then end up with a clock app full of alarms. If that's the problem, and the goal is to have the alarm only go off on work days, then approaching this problem the other way might be better.
Set the alarm to go of every day at the right time in the clock app, then create a profile that checks if today it's a work day, then set a variable.
In a second profile, use the variable (not a work day) as a context plus an AutoNotification intercept, for the alarm notification. You'll be canceling the alarm on days you don't need it.
On newer Android, there is a pre-notification that shows up some period before the alarm is set to fire (an hour maybe?). That notification has a dismiss button. If you intercept that notification, then the entry task can click on the dismiss button again using an AutoNotification action.
I think the category id is "Upcoming Alarms". This field can be examined by grabbing it in the AutoNotification profile context configured to "get all fields". Then flash %ancategoryid.
There are also clock app intents that can dismiss alarms. I don't use that because it doesn't work on my device. The intent looks like the following:
Send Intent [
This intent should only cancel the current occurrence of a repeating alarm.
If this works for you, then you can explore the android developer documentation - alarm clock
and discover a variety of intents.