I built a thin Android shell around the web interface of a private media archive: a single activity with a web view, a saved server address, and a notice to show when the server could not be reached. On a real phone over a cellular connection, almost everything worked on the first pass: browsing, zooming, swiping, the back button, downloads, restoring the last address. Then I turned on airplane mode to see the offline notice. It never appeared.
Nothing failed, so nothing reported failure
I expected a load error. There was none. The server is reachable only through a mesh VPN, and the VPN stayed up on the phone even with the radios off. Instead of being refused, connections simply hung. The web view did not report an error, and onPageStarted did not fire either, so the code waiting for a failure had nothing to react to.
The return path had the same problem. I had planned to reopen the page when Android's network callback reported a network again through onAvailable. That signal did not arrive either. From the system's point of view, the VPN network had never gone away, so there was nothing to become available.
A clock and a knock
Since the system would not tell the app that the connection was gone, the app had to notice by itself. I added a watchdog on page-load progress: if loading makes no progress for 15 seconds, the app shows the connection notice. While the notice is on screen, the app sends a lightweight HEAD request to the server every five seconds, and reopens the page as soon as one succeeds.
The retest on the same phone matched that design. With airplane mode on, the notice appeared 15 seconds after the connection dropped. After airplane mode was turned off, the page reopened by itself 14 seconds later, with nothing tapped.
The limits are worth stating. This was one phone, one VPN, and one way of cutting the network. The 15-second threshold is a choice, not a measurement: a very slow but working connection could trigger the notice too. Other kinds of outage, such as the server itself going down while the network stays up, were not part of this test.
Error handling depends on something actually reporting an error. When a tunnel can absorb the failure, the app has to keep its own time.