Repository navigation
Conversation
Roku: Options/* opens KeyboardDialog (Save/Reset/Cancel), ECP serverUrl= deep-link (contentID fallback), registry persists, status shows effective host. Android TV: Change-server button + long-press MENU server dialog, --es serverUrl intent extra, SharedPreferences persist, cleartext enabled for user-configured LAN http only.
accius
left a comment
There was a problem hiding this comment.
Thanks for picking up both follow-ups so quickly. The on-device dialogs are exactly what I had in mind, and normalizeServerUrl rejecting anything that isn't http(s) on both platforms is good. Before this merges, though, two things need to change, because they let something other than the person holding the remote change where the app points.
1. A server URL from outside the app should not be saved silently (Android + Roku)
- Android:
MainActivityis exported (it has to be, it's the launcher), andresolveHomeUrl()saves anyserverUrlintent extra to SharedPreferences. So any app installed on the TV can start the activity with--es serverUrl https://…, and from then on "OpenHamClock" loads that page every time, with nothing on screen to say it changed. - Roku: ECP is unauthenticated on the LAN, and
main.brswrites theserverUrl/contentIDlaunch parameter straight to the registry (before it's normalised). Any device on the network can repoint the channel for good.
Suggested fix, same on both: use an external value for that launch only, or open the existing server dialog prefilled with it so the viewer confirms with Save. Only the dialog's Save should persist. The adb/ECP route stays useful for setting up a TV without typing on the remote.
2. Cleartext is app-wide (Android)
android:usesCleartextTraffic="true" allows plain http for everything, not just the self-hosted server. And handleUrl keeps every http(s) link inside the WebView, so any http page the dashboard links to also loads unencrypted inside the app. A network security config can't express "private addresses", so I'd keep the flag and narrow it in code: in handleUrl, keep http:// navigation inside the WebView only when the host matches the configured server's host. Send other links to the system browser with ACTION_VIEW, or drop them. Then the app speaks plain http only to the server the user chose.
Smaller things, not blocking:
showServerDialog()prefills fromwebView.getUrl(), which after browsing is the current page, not the server. Prefill from the saved setting, or the default, instead.- Roku
main.brs: normalise before writing, or just stop writing there once item 1 is done.
The rest looks good: Save/Reset/Cancel on both, long-press on Menu so short-press still reloads, and the status line showing which server is in use. Thanks again. 73 de K0CJH
Follow-up to #1259 review (non-blocking items 1+2).
Roku: Options/* opens KeyboardDialog (Save/Reset/Cancel), ECP serverUrl= deep-link with contentID fallback, persists to OpenHamClock/serverUrl registry, status shows effective host.
Android TV: Change-server button on offline screen + long-press MENU/INFO/GUIDE server dialog (short-press still reloads), --es serverUrl intent extra, SharedPreferences persist, cleartext enabled for user-configured LAN http only (default stays https).
Verified: android-tv BUILD SUCCESSFUL + leanback badging, roku package.sh 13-entry zip + XML parse.