We shipped push notifications for StarBrook News — our free, no-paywall news app — in Build #24 of the new native Android app. The server side was already live: a subscribe endpoint, a weather-alerts sender, a token table. The first real test was a freeze warning for Oklahoma City, fired at 2:55 in the morning. The send reported success. The phone stayed silent.
Here is what was actually wrong. Three separate bugs, found one at a time, because each fix revealed the next one.
Bug 1: the permission prompt never fired
The app only asks for notification permission when you turn a toggle on. The toggles were already on — carried over from the previous build — so the prompt never appeared, and the phone had no permission to show anything. The send still reported alerts_sent: 1, errors: [], because from the server's side everything worked. The failure was invisible to every log we had.
The fix was a phone tap, not code: flip Weather alerts off and back on, which fires the prompt, tap Allow.…