mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-10-30 23:51:57 +01:00
Two changes to the Android wrapper, shipping together as app version 2.1 (versionCode 6). Notifications stopped arriving a few minutes after the app was backgrounded, and no setting on the phone could prevent it: Android freezes a process with nothing in the foreground, and a frozen process runs no JavaScript and holds no socket. MeshWatchService is a foreground service of type remoteMessaging that does no work of its own - it exists so Android leaves the process alone. Every notification is still built by the mc-webui page, so mutes, blocked senders, channel names, translations and deep links stay in one place rather than being duplicated in Kotlin. The service follows mc-webui's own notification toggle, read from localStorage by the shim rather than asked of the page, because the wrapper connects to whichever server its user typed in - very often an older mc-webui. The shim also wraps Storage.prototype.setItem, since localStorage fires no event in the document that wrote it. Android's own switches have the last word, so a revoked permission or a silenced channel stops the service too. setRendererPriorityPolicy goes with it: the page renders in a process of its own, and WebView waives that process's priority once the view stops being visible, so a service saving only the host process would still lose the renderer under memory pressure. Separately, the address screen now lists the servers reached before, so running more than one instance no longer means retyping the whole address to switch. Only addresses that answered are listed, which keeps typos out. Also replaces the deprecated setDecorFitsSystemWindows with enableEdgeToEdge, which is what Play Console has been flagging twice. Its default navigation-bar scrim is overridden, or it would paint over the strip the wrapper colours to match the page below Android 10. Docs, the privacy policy (both languages) and the app-vs-PWA comparison are updated: three of them said the app ran nothing in the background. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>