Ring Mode Scheduler

by Grant Mumaugh

Version 3 (December 5, 2025)

Download (33 downloads)

// Summary
- Set up a schedule of ring modes to automatically change to silent, vibrate, or ringer at specific times.

// Tests
- Verified functionality on Samsung and Xiaomi devices.
- Issue with OnePlus devices where timing is inaccurate up to 30s. Timer workarounds do not fix the issue for me.

// Roadmap
- Add option to immediately apply a single selected entry's information.

// How to use
1. Add an empty quick tile to your notification bar, then start the flow.
2. Tap the tile to start scheduling a ring mode. Choose how many entries to add, the ring mode to set, date, and time. If the validity checks pass, a new fiber is created and waits for the time assigned to it.
Check 1 - Entered time must be later than the "Now" variable. While "Now" does not change during a single block's execution, it may by the time the flow gets to the validity check.
Check 2 - An entry does not already exist with the chosen time.
3. Once there is at least one entry in the schedule, the tile state will become enabled. When the schedule returns to empty, the tile returns to a disabled state. This state is only a feedback, it does not change which functions are available.
4. Press and hold the tile to view the entries currently in the schedule, sorted by the next upcoming time. Here, individual entries can be selected and pressing OK will show another dialog asking if you want to just delete the entries, or edit them.
5. Once a scheduled time is triggered, the ring mode associated with that fiber is set and the entry data is removed from the flow.

// Notes
- If you are viewing any of these dialogs: [Number of Entries to Add, Current Schedule, Schedule Edit Confirmation] while a scheduled ring mode is set, it will be cancelled. The fiber will restart in the correct state and you will have to start a new process from the tile.
- If you are in the middle of adding a new entry (ring mode, date, time) while a scheduled ring mode is set, the process remains unaffected. You can continue to add or cancel the entry and the fiber will restart in the correct state.

// Changelog
- 2025-12-5 - r5.0p3
- Major overhaul of schedule tracking results in much cleaner data and logic flow. Most processes require looping the entire schedule, but it's not a big issue
- Replaced overcomplicated jumps with process/reason array. Makes deciding which label to jump to and where to return to much easier to track

- 2025-11-8 - r3.3p2
- Character limits reduce amount of changelog information.
- Fixed a few minor issues that came from using two different dictionaries to track entry information. By switching to a single-dictionary approach, a few other things could be cleaned up as well. The biggest downside now is checking for duplicates has become much less elegant. Still WIP on this.
- Changed a few variable names to better explain what they are/do