The poller survives a swipe, which is whether the phone can be reached

There is no push on Android, by choice: no Firebase, no Play Services,
nothing that needs a Google account to receive a message. MessengerService
IS the delivery path, so whether it is running is whether the phone can be
reached at all.

It was declared without `stopWithTask`, which defaults to true, so swiping
the app out of Recents destroyed it. Nothing brought it back: START_STICKY
covers a process the system killed for memory, not a task the user removed.
The phone then went silent until somebody opened the app again.

From the outside that is a phone that does not ring, does not receive, and
collects everything in a burst when it is next opened, which is exactly
what a week of "Android answers then hangs up", "the call just goes away"
and "the story never appeared" looks like. Nobody would guess that closing
the app from Recents is what did it.

Observed on a real handset: last poll 11:08, forty-two envelopes still
waiting on the relay thirteen hours later, while the iPhone on the same
account was current. iOS was never affected because APNs wakes it.

Verified in the compiled APK, not just the source: aapt2 shows
`android:stopWithTask=false` on the service in the installed manifest.

1474 unit tests green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-09-17 20:53:26 -04:00
co-authored by Claude Opus 5
parent 616e23c16c
commit 611a16d0b3
+21
View File
@@ -97,9 +97,30 @@
</intent-filter>
</activity>
<!--
`stopWithTask="false"` is what makes this phone reachable at all.
There is no push on Android, by choice: no Firebase, no Play
Services, nothing that needs a Google account to receive a message.
This service IS the delivery path, so whether it is running is
whether the phone can be reached.
The default is `true`, which means swiping the app out of Recents
destroys it. Nothing restarts it afterwards: `START_STICKY` covers a
process the system killed for memory, not a task the user removed.
So the phone went silent until somebody opened the app again, and
from the outside that is a phone that does not ring, does not
receive, and collects its messages in a burst whenever it is next
opened. Observed on a real handset: last poll 11:08, forty-two
envelopes waiting on the relay thirteen hours later.
A messenger that stops receiving when it leaves Recents is not one
people can rely on, and nobody would guess that is what happened.
-->
<service
android:name=".app.MessengerService"
android:exported="false"
android:stopWithTask="false"
android:foregroundServiceType="remoteMessaging|microphone|camera" />
<!--
Decline, from the notification, without opening the app. The whole