When I’m doing endurance (Audax) cycling I have a periodic beep timer on the phone for every 20 minutes to remind me to drink (=eat because the drink is my primary energy source). It’s easy to forget otherwise. Especially if chatting with someone, or riding through the night. For some reason the timer app I had been successfully using went flakey, truncating the last 1/2s of my custom sound files. Probably some Android automatic update.
I was already using another app MacroDroid for text-to-speech announcements of the battery % @ 5% increments while charging or discharging as I try to maintain it between 40 & 60%. On multi-day events I charge the phone while riding for an hour in the afternoon before I need the dynamo power for the headlight. So I experimented with getting MacroDroid to handle the periodic beep & improve the battery % announcements. It all seems to work very well; too easy.
I defined 2 “modes” – quiet & cycling. I created a shortcut on the home screen which brings up a dialog to set the mode. You can even set a default button and have a countdown to auto accept the default.

In quiet mode the beep & battery % are of course disabled. Important when sleeping at a control.
Each macro has 3 parts – triggers, actions, constraints. The Timer macro “20m timer” is below – it’s pretty easy to read what’s going on even to a non-programmer:

The Battery Level macro is a bit more involved, but still very readable. The Play & Popup actions are just for debugging.

I created 5 sound (OGG) files, each with 1 to 5 beeps. Different apps/ notifications use different sound files. Errors are notified with 5 beeps, less important events use the 1 or 2 beep sound files. I used a signal generator app set to sweep across the audio spectrum so I could determine the resonant (loudest) frequency of the speaker to maximize volume. When cycling in traffic or rain its still easy not to hear the loudest beeps.
I wrote another macro which triggers when the phone is turned on to bring up the mode setting dialog which is then automatically/ normally set to quiet.
You can backup MacroDroid settings & macros to an XML file for safe keeping. Which then allow you to use something like WinMerge to show differences between 2 versions of the files if needed.
Amazing what’s possible for only a few bucks & a little patience!
Such a simple process – NOT!!!! 😉
LikeLike