feat(todo): places are watched by a quiet service, and asked to notify (ADR 0033, D32)
The first walk showed two faults. Android gives a proximity alert of an app in the background a fix every 30 minutes (17:04:38, then 17:34:43 on the Pixel), so a short stop goes unseen. And the place did remind, at 17:36:43, but nothing had asked to notify, so Android showed nothing. A foreground service of the type location now takes its own fixes while places wait, under the quietest notification there is: as long as reaching the nearest circle takes at 30 m/s, doubled while the phone lies still, between 30 s and 5 min. A place with a reminder asks to notify as any reminder does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
0a9facc3a2
commit
a7385e2169
1 changed files with 499 additions and 125 deletions
|
|
@ -629,18 +629,33 @@ The developer's review of 4 Nov 2026, again beside Todoist's screens.
|
|||
and a pin button with the name or a count do the same by hand. The task sheet has a
|
||||
Where box, each place with its ⋮; a task's row shows the name and how many more.
|
||||
- *Reminders* are on the device, Android alone (`LocationReminderGateway`, a no-op
|
||||
elsewhere, which offers none), as the instance reads no task: the system's
|
||||
`LocationManager.addProximityAlert`, 150 m, no Google services, which GrapheneOS
|
||||
lacks. Planned from the open tasks as `ReminderScheduler` plans reminders
|
||||
elsewhere, which offers none), as the instance reads no task, with no Google
|
||||
services, which GrapheneOS lacks: a foreground service of the type `location`
|
||||
(`LocationWatchService`) takes its own fixes while places wait, stopped as none
|
||||
does. Planned from the open tasks as `ReminderScheduler` plans reminders
|
||||
(`planLocationWatches`), cancelled in `TodoPerson.dispose`, kept in the app's private
|
||||
preferences (titles unsealed there, as reminders' are; `allowBackup` is off),
|
||||
registered anew after a restart or an update and on the process's first plan, as a
|
||||
force stop drops them unseen. Fused-provider geofencing was refused: it is Google's.
|
||||
preferences (titles unsealed there, as reminders' are; `allowBackup` is off), and
|
||||
started anew after a restart or an update and as the app opens. Android may refuse
|
||||
the start with the app out of sight, a task synced in; then it starts at the next
|
||||
opening.
|
||||
- *Why a service* (the developer's, 5 Nov 2026, on the first walk): the system's
|
||||
`LocationManager.addProximityAlert`, built first, needs neither service nor
|
||||
notification, but Android gives an app in the background a fix for it every 30
|
||||
minutes (seen on the Pixel: 17:04:38, 17:34:43), so a short stop goes unseen, and
|
||||
asking for updates in the background is held likewise. Keeping it was the
|
||||
alternative, up to half an hour late; fused-provider geofencing was refused, it is
|
||||
Google's. The price is a notification while places wait, on a channel of the least
|
||||
importance (`places_watched`), and the fixes, kept few (`LocationDwell.interval`):
|
||||
as long as reaching the nearest circle takes at 30 m/s, doubled for each fix the
|
||||
phone lay still (moved under 50 m), between 30 s and 5 min, at balanced accuracy on
|
||||
the fused provider of Android's own, GPS before Android 12. What it costs a day
|
||||
wants measuring. A fix rougher than 100 m says nothing of a circle.
|
||||
- *Dwell*, so that driving past an EDEKA on the way to the next doesn't remind (the
|
||||
developer's question): crossing the circle schedules a check two minutes later, a
|
||||
crossing back cancels it, and the check notifies only if the phone is still on that
|
||||
side (`LocationDwell`, pure, with JUnit tests CI doesn't run yet), by a fix at most
|
||||
90 s old where there is one, else by the system's last event. A red light of over
|
||||
developer's question): crossing the circle (in at 150 m, out beyond 200 m, so a fix's error
|
||||
doesn't flap) schedules a check two minutes later, a crossing back cancels it, and
|
||||
the check notifies only if the phone is still on that side (`LocationDwell`, pure,
|
||||
with JUnit tests CI doesn't run yet), by a fix at most 90 s old where there is one,
|
||||
else by the last crossing. A red light of over
|
||||
two minutes beside the shop still reminds; that is accepted for now.
|
||||
- *Once*: a task reminds once until it changes (title, day, places: `stamp`), and an
|
||||
alternative that reminded stops the task's others. The notification goes on the
|
||||
|
|
@ -648,6 +663,8 @@ The developer's review of 4 Nov 2026, again beside Todoist's screens.
|
|||
- *Permission*: the position first, then, told why, *Allow all the time* in the
|
||||
system's settings, asked as a person chooses such a reminder and never by planning
|
||||
(a task may sync in); Settings' Reminders says while it is off, with Turn on, as D31.
|
||||
Notifications are asked for as for any reminder (D31), which the first walk found
|
||||
missing: the place reminded on time and Android showed nothing.
|
||||
- *A debug build installs beside the release* (`.debug`, *Todo Debug*), the keys
|
||||
differing; SimpleLogin's way back keeps the scheme the instance allows, so with both
|
||||
installed Android asks which app answers it. Debug builds log to
|
||||
|
|
|
|||
Loading…
Reference in a new issue