How to catch Alarm setting or dismissing?

Nonhocapito

New member
I am trying to trigger a macro when the user sets an alarm, or dismisses it.

I tried with the "Intent received" trigger, using
Code:
android.intent.action.SET_ALARM
but it had no effect.

Is there any other way?
 

Endercraft

Moderator (& bug finder :D)
I think it is possible with logcat trigger, depending on the OS version.
Indeed it probably is, but unlike @Jacob L I have lots of trouble with Logcat including impossible delays that I don't even know the duration of. It may depend on the device, but for me it did not work at all on the old and the new has these delays.
 

Dimlos

Well-known member
The Clock Task plugin can also trigger alarm changes.
I tested it and it did not work perfectly so I ruled it out.
 

Dimlos

Well-known member
I am not recommending logcat triggers without testing, for the Google app I have already created a macro and can upload it.
There may be differences in the behavior of the logcat trigger depending on the device, but it works fine on the device I have.
 

Nonhocapito

New member
This doesn't seem to do anything with the stock clock on Android 10 on my device.

I tried investigating logcat from termux as I added, modified, enabled, disabled or deleted alarms, using
Code:
logcat | grep alarm

The intent seems to be called
Code:
android.app.action.NEXT_ALARM_CLOCK_CHANGED

and the app in question seems to be
Code:
com.android.deskclock

I found messages such as

Code:
AlarmClock: Deleting all instances of alarm: 6

Setting upcoming AlarmClockInfo for alarm: 1

I'll try to update the macro using this and report back
 
Last edited:

Nonhocapito

New member
I seem to be able to catch some events like this. How to tell MacroDroid what buffers to use though? I cannot find this in the logcat output on Termux.
 

Dimlos

Well-known member
I believe this macro will work with the stock Google app.
 

Attachments

  • Macro.jpg
    Macro.jpg
    622.4 KB · Views: 10
  • alarm_trigger.macro
    2.5 KB · Views: 8
Top