Roffild
Roffild
Standard condition: The server is unavailable when starting the application. This is normal for HA. It's easy to reproduce the error.
This piece of strange code has no logs! No `Log.d()`
WebView calls a pop-up to update frozen WebView. It’s better to immediately have a normal mini-webpage with a server poll. After connecting to the server, reconnection is done through JavaScript...
https://github.com/Roffild/roffild.github.io/assets/38705255/2e049aea-bc77-482c-8355-d03e22345464 build MinimalDebug Bug in https://github.com/home-assistant/android/blob/2373127fb0ff1be447e4138ae1f2c85aad2645c8/app/src/main/java/io/homeassistant/companion/android/webview/WebViewActivity.kt#L1358 ```kotlin alert.setMessage(commonR.string.webview_error) alert.setPositiveButton(commonR.string.settings) { _, _ -> startActivity(SettingsActivity.newInstance(this)) // NO webView.loadUrl() } val isInternal = serverManager.getServer(presenter.getActiveServer())?.connection?.isInternal() == true alert.setNegativeButton( if (failedConnection == "external" &&...
Full fix for: https://github.com/Roffild/roffild.github.io/assets/38705255/2e049aea-bc77-482c-8355-d03e22345464
`showError()` gives a choice to the user. But this choice doesn't know about the WebView's status. Open http://hass.example.com in your browser. You will get an error. WebView doesn't autoReload. Will...