This commit is contained in:
Philipp Heckel 2026-04-07 14:55:24 -04:00
parent 3e93a3fb8d
commit 992f9a5392
3 changed files with 9 additions and 2 deletions

View file

@ -17,8 +17,8 @@ android {
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 36 targetSdkVersion 36
versionCode 60 versionCode 61
versionName "1.24.0" versionName "1.25.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -40,6 +40,7 @@ class Application : Application() {
// where the underlying socket is bound to a network that's no longer the default. // where the underlying socket is bound to a network that's no longer the default.
// Without this, broken connections would only be detected via the (potentially // Without this, broken connections would only be detected via the (potentially
// long) ping/pong timeout. // long) ping/pong timeout.
Log.i(TAG, "Default network available ($network); forcing reconnect of all connections")
ioScope.launch { ioScope.launch {
repository.getSubscriptions() repository.getSubscriptions()
.map { it.baseUrl } .map { it.baseUrl }
@ -49,8 +50,13 @@ class Application : Application() {
} }
} }
override fun onLost(network: Network) { override fun onLost(network: Network) {
Log.i(TAG, "Default network lost ($network); refreshing subscriber service")
SubscriberServiceManager.refresh(this@Application) SubscriberServiceManager.refresh(this@Application)
} }
}) })
} }
companion object {
private const val TAG = "NtfyApplication"
}
} }

View file

@ -1,6 +1,7 @@
Features: Features:
* Add configurable "Alert when connection is lost" setting (#1665, #1662, #1652, #1655, thanks to @tintamarre, @sjozs, @TheRealOne78, and @DAE51D for reporting) * Add configurable "Alert when connection is lost" setting (#1665, #1662, #1652, #1655, thanks to @tintamarre, @sjozs, @TheRealOne78, and @DAE51D for reporting)
* Suppress connection alerts and stop foreground service when there is no network (ntfy-android#165, thanks to @tintamarre for the contribution) * Suppress connection alerts and stop foreground service when there is no network (ntfy-android#165, thanks to @tintamarre for the contribution)
* Improve battery life by increasing WebSocket client ping interval from 1 min to 5 min, and reconnect instantly on Wi-Fi/cellular/VPN transitions (ntfy-android#113, thanks to @ftilde for the investigation)
Bug fixes + maintenance: Bug fixes + maintenance:
* Undo automatic phone number linking for numbers in message body (ntfy-android#170, thanks to @acortelyou for the contribution) * Undo automatic phone number linking for numbers in message body (ntfy-android#170, thanks to @acortelyou for the contribution)