Pinned Calendar: An Offline Agenda With Recurring Tasks for Android
Your calendar and recurring tasks, visible in one persistent Android notification. How I built Pinned Calendar with actionable reminders, an adjustable agenda layout, and on-device storage, now available on Google Play.
A calendar reminder disappears when I swipe it away, even though the appointment still matters. I built Pinned Calendar to keep upcoming events and local tasks visible in one persistent Android notification. The app now includes recurring tasks, due-time reminders with Mark done and Snooze actions, and a live layout preview, and it is available on Google Play. It reads calendars already synced to the phone and stores tasks on-device, with no sign-in or internet permission. Kotlin and Jetpack Compose handle the app; a self-healing notification keeps the agenda within a swipe of whatever I am doing.
Keep the Plan Where You Already Look
The notification shade is useful because it follows me between apps. Pinned Calendar puts events and tasks on that surface, grouped by day and marked with calendar or task-priority colors. An event row opens its calendar entry; the rest of the pin opens the app.
That changes what a reminder has to do. The agenda can stay visible without sounding an alarm every time it refreshes, while a task that is actually due can produce a separate alert. Keeping those roles separate became more important as the app grew beyond a read-only week view.


Tasks That Follow Your Schedule
Local to-dos now carry due dates, times, notes, and priorities. Quick date choices cover today, tomorrow, and next week, with a picker for a specific time. The list groups unfinished work into Overdue, Today, and Upcoming, with completed items kept separately. An unfinished task carries forward instead of disappearing when its original date passes.
Recurrence supports daily, weekly, monthly, and yearly presets, plus custom intervals and selected weekdays. A series can end on a date or after a chosen number of occurrences. Completing a recurring task advances it to the first upcoming occurrence, skipping missed dates while preserving its scheduling intent.
That last detail is easy to overlook. A monthly task near the end of a month should not drift because February is shorter, and a local morning reminder should retain its meaning across time-zone offset changes. The recurrence logic handles month-end and leap-year cases in the task model, where those rules can be tested independently of the interface.
Act on a Reminder Without Opening the App
To-do reminders use their own alerting, dismissible notifications. Mark done completes the scheduled occurrence, including advancing a recurring task. Snooze 30 min postpones that occurrence's reminder without changing the task's original due time. Neither action removes the pinned agenda.

AlarmManager schedules the next due task, then the receiver schedules the following one after handling it. Snoozed occurrences have separate alarm identities, so postponing one reminder does not overwrite another. On Android versions requiring exact-alarm access, the scheduler checks whether that access is available:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
!alarms.canScheduleExactAlarms()) {
alarms.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerAtMillis, intent)
} else {
alarms.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerAtMillis, intent)
}
Without exact access, the fallback still schedules the reminder, although Android may deliver it later. Heads-up presentation also depends on system notification settings. These are platform controls that the app respects rather than treating every reminder as a reason to keep a process running.
Persistent, With a Deliberate Way Out
The pin carries a delete-intent pointing to SelfHealReceiver. When Android delivers a dismissal, the receiver reads the saved settings and rebuilds the agenda. An accidental swipe therefore triggers a refresh instead of permanently losing the week view.
Persistence also needs an intentional dismissal. With swipe-twice-to-remove enabled, two dismissals within five seconds turn the saved pin setting off. It stays off until the user enables it again. The in-app switch provides the same explicit control, so the app can recover from accidents without ignoring a deliberate decision. A priority setting chooses Top, Normal, or Silent; Top keeps the pin above everyday notifications without a sound or pop-up.
Calendar changes take a separate route. A ContentObserver requests a refresh while the process is alive, and a periodic WorkManager job supplies a background baseline. Boot and app-update receivers re-arm the schedule. Android can defer background work, particularly on devices with aggressive battery management, but the design needs no foreground service or second service notification.
Deferred work caused one visible bug: after a night in Doze, the pin could still label yesterday as Today. Every refresh now also sets one allow-while-idle alarm for the next local midnight, and that alarm refreshes the pin directly instead of waiting for a background job. Clock and time-zone changes trigger a refresh too, so the day labels are correct in the morning.
Preview the Notification You Are Building
Settings now renders the actual notification layout as a live preview, with collapsed and expanded views. Compact, Cozy, and Comfortable presets provide starting points; Custom sliders expose finer control. The number of rows before expansion, day grouping, and heading visibility can all be adjusted without repeatedly leaving the app to inspect the shade.
The time window remains selectable: three days, this week, seven days, or fourteen days. Per-calendar switches and an item cap help keep a busy work calendar from overwhelming the view. Wallpaper-based Material You colors, six accent seeds, four palette styles, AMOLED black, five fonts, and light or dark themes extend that control to appearance.


Keep the Data on the Phone
Calendar reads go through Android's CalendarContract provider. Pinned Calendar does not authenticate with Google or run its own calendar synchronization; whichever calendar apps already sync the phone supply the events it sees. Tasks and preferences live in DataStore.
The manifest declares calendar, notification, boot, exact-alarm, and optional battery-exemption permissions, and omits INTERNET. Cloud backup is disabled for application data. The privacy policy describes that local storage model, which also means task data is not a cross-device sync service.
The complete app and reminder experience supports 15 languages, including right-to-left Arabic. On Android 13 and newer, a Language setting under Appearance uses the platform per-app language API, so the choice matches the system's app-language page and changes the app without changing the phone's language. Notification labels and reminder actions follow the selected language rather than leaving the background experience in English.
Keep the Date Rules Testable
Window calculation, day grouping, and notification content construction live in a pure-Kotlin core. Injected clocks let tests fix the instant around midnight instead of waiting for real time to pass. Recurrence and reminder tests exercise the rules that make a task advance, stay overdue, or become eligible for an alert, while platform tests cover receivers and scheduling.
The source repository includes build instructions and signed releases. For everyday use, Google Play is the direct install route. Every feature stays free; the Play build adds an optional tip jar under Settings > Support development that unlocks nothing. The portfolio entry gives a shorter account of the app and the implementation choices behind it.