[GH-ISSUE #1662] Retry connection on network status change in mobile apps #1160

Open
opened 2026-05-07 00:30:42 +02:00 by BreizhHardware · 1 comment

Originally created by @sjozs on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1662

💡 Idea
Mobile apps could reset the retry timeout every time the network status changes (or at least when the user turns on WIFI/mobile data). This would lead to quicker reconnection (and eventually the app could probably limit persistent retries for when there is any kind of network connection, which would help with battery usage, which is something like 55% on my device for some reason, though I'm not sure how that happened, might be a problem with always-on DNS, similarly to #1088).

💻 Target components
Mainly Android and iOS apps, I'm not sure about iOS but on Android there is the ConnectivityManager::registerNetworkCallback API to monitor network change events.

Originally created by @sjozs on GitHub (Mar 17, 2026). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1662 :bulb: **Idea** Mobile apps could reset the retry timeout every time the network status changes (or at least when the user turns on WIFI/mobile data). This would lead to quicker reconnection (and eventually the app could probably limit persistent retries for when there is any kind of network connection, which would help with battery usage, which is something like 55% on my device for some reason, though I'm not sure how that happened, might be a problem with always-on DNS, similarly to #1088). :computer: **Target components** Mainly Android and iOS apps, I'm not sure about iOS but on Android there is the [ConnectivityManager::registerNetworkCallback](https://developer.android.com/reference/android/net/ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest,%20android.app.PendingIntent)) API to monitor network change events.
Author
Owner

@t-m-w commented on GitHub (Mar 29, 2026):

This would be a nice improvement.

Signal is an example of an app that does this. It reconnects its background connection when you go from Airplane Mode + Wi-Fi Off, to Wi-Fi On, for example -- but only if you aren't using a VPN that obscures the situation by appearing to be "connected" for the entire time, as some do. When I checked ntfy to see if it behaves any better, I saw that it doesn't react to connection changes at all.

That said, since ntfy appears to try to reconnect every 120 seconds on the top end (at least that's what I see with the F-Droid version and a custom server), that's already much better than the situation with Signal + VPN which today resulted in my missing its notifications for more than an hour. Missing them for up to two minutes certainly isn't so bad.

<!-- gh-comment-id:4151312303 --> @t-m-w commented on GitHub (Mar 29, 2026): This would be a nice improvement. Signal is an example of an app that does this. It reconnects its background connection when you go from Airplane Mode + Wi-Fi Off, to Wi-Fi On, for example -- but only if you _aren't_ using a VPN that obscures the situation by appearing to be "connected" for the entire time, as some do. When I checked ntfy to see if it behaves any better, I saw that it doesn't react to connection changes at all. That said, since ntfy appears to try to reconnect every 120 seconds on the top end (at least that's what I see with the F-Droid version and a custom server), that's already much better than the situation with Signal + VPN which today resulted in my missing its notifications for more than an hour. Missing them for up to two minutes certainly isn't so bad.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1160
No description provided.