Class DoseReceiver

java.lang.Object
android.content.BroadcastReceiver
com.aurelienpierre.sioul.DoseReceiver

public final class DoseReceiver extends BroadcastReceiver
A dose's alarm, and the "Taken" of its reminder (DoseAlarms): each asks Rust's side (crates/sioul-app/src/alarms.rs) on a thread of its own, the broadcast held open meanwhile (goAsync). At an alarm, Rust first gives the sync app twenty seconds to bring your other devices' marks; Android gives the alarm's broadcast a minute (it comes from the background), the button's ten seconds (from the foreground). An expedited JobScheduler job would get longer, but waits for its turn, its quota and the phone's sleep, where a broadcast runs at once. Past the deadline the broadcast is let go, before Android takes Sioul for hung and stops it: an alarm's reminder then says to check in Sioul rather than nothing, and Rust's answer, if it comes, replaces it.