Lesson 6: Reminders & Alarms
Goal of this lesson
Explain the difference between an alarm and a reminder, the reminder states, the full reminder-call flow, how reliability is handled, and how adaptive timing works.
Alarm vs. reminder
| Alarm | Reminder | |
|---|---|---|
| Purpose | Wake up at a time | Remember a deadline, class, or activity |
| Alert | Native ringing screen with Dismiss / Snooze | Simulated incoming call, or notification only |
| Speech | Optional Morning Briefing after dismiss | Spoken reminder + voice reply |
| Sync | ❌ Stays on this phone | ✅ Synced with an account |
| Table | alarms | reminders |
How a reminder gets scheduled
- Lead time: a reminder can ring before the item it’s about, with lead times of up to 24 hours.
- Delivery style per reminder: Call me (simulated call) or Notify only (a notification with Acknowledge and Snooze buttons).
- Generation number: every rescheduling increases a generation. A late or old alarm with an outdated generation is ignored, so a stale alarm can never ring for a reminder that has moved.
- SQLite and Android scheduling are not one atomic transaction, so a reconciler re-registers alarms from the database after changes.
Reminder states
Acknowledged ≠ task done
Acknowledging only means “I heard it”. The linked task stays pending until the student completes it. If the task is already completed when the alarm fires, the call doesn’t ring.
The reminder call, step by step
Fallbacks: if the microphone or Whisper is unavailable, the call shows Acknowledge / Snooze buttons. Buttons are always available.
Online version: if the student is online with online voice enabled, LAFINA first speaks the reminder and then hands the call to a live online conversation (Lesson 7). If the internet drops mid-call, it switches back to on-device voice.
Time limits: an answered call is limited to about 10 minutes, and a queued call to about 15 minutes.
Snooze rules
| Setting | How it works |
|---|---|
| Spoken snooze | The minutes you say (“give me 10 minutes” → 10) |
| Default / auto-snooze length | From the student’s preferences (5 minutes by default) |
| Snooze limit | When the limit is reached, an ignored call marks the reminder missed instead of snoozing again |
Reliability: why reminders still ring
What LAFINA does
- Uses Android AlarmManager exact alarms, not an in-app timer.
- Recovery receivers re-register pending alarms after a reboot or a timezone change.
- Records delivery jobs and events (
reminder_delivery_jobs,reminder_delivery_events) for recovery and audit. - Adopts snoozes that native code applied while the app’s JavaScript wasn’t running.
- Provides Profile → Alarm & Reminder Health: permission checks plus a test alarm.
Honest limitation: notification, exact-alarm, and full-screen permissions, plus aggressive battery saving on some brands (some Infinix, Tecno, and itel phones), can delay alerts. The fix is to set LAFINA’s battery setting to Unrestricted.
Adaptive reminder timing (machine learning)
LAFINA can suggest a better lead time based on how the student usually responds. It runs fully on the phone.
The student can turn adaptive timing off, and suggested timing changes appear in the review flow.
Morning Briefing
After dismissing an alarm, LAFINA can speak a short briefing of the day (classes, tasks, reminders), personalized with Memory. It runs locally with the phone’s voice.
Check yourself
- Give three differences between an alarm and a reminder.
- Name the five reminder states and what moves a reminder between them.
- What is the generation number for?
- What happens on decline, on silence, and after 3 misunderstood replies?
- How does LAFINA survive a reboot?
- Which three ML techniques does adaptive timing use, and what are the safety limits?