Skip to content

fix(app): Android app reaches the Mac; launcher icon; apps check for updates - #22

Merged
th3r-dev merged 2 commits into
devfrom
fix/app-lan-requests-icon-updates
Nov 11, 2026
Merged

th3r-dev merged 2 commits into
devfrom
fix/app-lan-requests-icon-updates

Conversation

@th3r-dev

Copy link
Copy Markdown
Owner

Fixes three problems in the Windows and Android apps.

1. Connect on the Android app always said "Can't reach "

The app's page is https://dioxus.index.html, and Android's WebView blocks every http:// request from it as mixed content, so the tablet app could never reach a Mac:

Mixed Content: The page at 'https://dioxus.index.html/' … requested an insecure resource 'http://10.43.77.126:47100/hello'. This request has been blocked

Nearby still found the Mac because its sweep runs in native code. Before pairing, the failure read "Failed to fetch"; pairing's /hello step now reports it as "Can't reach".

Fix:

  • Inside the apps, requests to a host go through native code: window.mullionNative.http, which calls mullion_proto::lanhttp.
  • That path only accepts:
    • plain HTTP to a private or loopback IPv4 address;
    • GET or POST;
    • the Content-Type and X-Mullion-Auth headers.
      It also enforces one total deadline and size caps.
  • The page uses one mullionFetch for every request to a host: offer, challenge, pairing, /hello and the layout map. In a browser it's plain fetch.
  • Bridge replies are now tagged, and slow work runs on its own thread. A Nearby sweep no longer holds up requests or the full-screen toggle.

2. The APK's launcher icon was Android's template robot

dx 0.7.10 ignores the bundle icons on Android. tools/make-icons.py --android now writes adaptive and legacy launcher icons to crates/app/android/res, and build-android.sh lays them over the generated ones.

3. The apps check for updates

  • The Windows and Android apps ask GitHub for the newest release at start and every 6 hours.
  • If there's a newer one, the page shows Get Mullion , linking to that platform's file (-windows-x64.exe or -android-arm64.apk).
  • The page asks GitHub itself over HTTPS, so there's no new native dependency.
  • The version order matches mullion_proto::version::is_newer: all 13 of its test cases agree.
  • On Android, the link's tooltip says to remove the app first, because each beta APK is signed with a different key. Fixing that needs a stable signing key kept as a secret, which can come in a follow-up.

Testing

  • cargo test: 72 pass, including 4 new lanhttp tests.
  • In an Android 15 emulator:
    • the beta.15 APK's fetch is blocked as mixed content;
    • this branch's APK pairs and connects (ICE, DTLS and the data channel all up);
    • the launcher shows Mullion's icon;
    • a build stamped beta.14 offers beta.15.
  • The evidence is in the first comment.
  • Not tested: the Windows app. It runs the same page code.

@th3r-dev

th3r-dev commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner Author

Evidence

I captured this in an Android 15 emulator (arm64, WebView 124) on the Mac. The files are in docs/evidence/app-fixes/.

1. Connect, before and after (android-connect-log.txt)

Before, with the released beta.15 APK:

location.origin = "https://dioxus.index.html", isSecureContext = true
fetch('http://10.43.77.126:47100/hello') -> TypeError: Failed to fetch
Mixed Content: The page at 'https://dioxus.index.html/' was loaded over HTTPS, but requested an
insecure resource 'http://10.43.77.126:47100/hello'. This request has been blocked

After, with this branch's APK against a dev host (window.mullionNative = nearby, http):

pairing requested by Android test
paired Android test
offer from 10.43.77.126:50209 answered (Mirror)
#1 ice: Completed
#1 dtls connected
#1 data channel open: probe
#1 receiver: jitterBufferTarget supported=true … ua=Mozilla/5.0 (Linux; Android 15; sdk_gphone64_arm64 …; wv) … Chrome/124…

The page reported streaming. The emulator then ran out of memory decoding 1080p60 H.264 in software: it has no GPU and runs without a window. That's the test machine's limit; a tablet decodes in hardware.

2. Launcher icon

Android dock with Mullion's icon in the middle

3. Update check: a build stamped 0.1.0-beta.14 offers beta.15 (bottom left)

Mullion Android app; bottom left: Get Mullion 0.1.0-beta.15 above Mullion 0.1.0-beta.14

The Mac's host name in Nearby is replaced with [Mac name]. Afterwards I removed the test pairing and shut down the emulator.

…for updates

- Tapping Connect in the Android app said "Can't reach <IP>" every time. Its
  page is https://dioxus.index.html, and Android's WebView blocks every
  http:// request from it as mixed content, so the page could never reach a
  host (Nearby still worked: its sweep is native). Requests to a host now go
  through native code in the apps, window.mullionNative.http, which calls
  mullion_proto::lanhttp: plain HTTP to a private or loopback IPv4 address
  only, GET or POST, only the Content-Type and X-Mullion-Auth headers, one
  total deadline, size caps. The page uses one mullionFetch for every host
  request (offer, challenge, pairing, hello, layout map); in a browser it is
  fetch. Bridge replies are tagged and slow work runs on its own thread, so a
  Nearby sweep no longer holds up requests or the full screen toggle.
- The APK showed Android's template robot as its icon: dx 0.7.10 ignores the
  bundle icons on Android. tools/make-icons.py --android writes adaptive and
  legacy launcher icons (crates/app/android/res), and build-android.sh lays
  them over dx's.
- The Windows and Android apps check GitHub for a newer release at start and
  every 6 hours, and show "Get Mullion <version>" linking to that platform's
  file. The page asks GitHub itself (HTTPS is allowed). The version order is
  the same as mullion_proto::version::is_newer. On Android the link says to
  remove the app first: beta APKs are signed with a different key each build.

Checked: 72 tests pass (4 new for lanhttp). In an Android 15 emulator: the
beta.15 APK's fetch is blocked as mixed content; this branch's APK pairs and
connects (ICE, DTLS and data channel up); the launcher shows Mullion's icon;
a build stamped beta.14 offers beta.15.
@th3r-dev
th3r-dev force-pushed the fix/app-lan-requests-icon-updates branch from 7205ccf to 10fb4b3 Compare November 11, 2026 18:09
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@th3r-dev
th3r-dev merged commit 346fd63 into dev Nov 11, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant