Skip to content

Put the Loopky fox in the middle of a share QR code - #333

Merged
jvsena42 merged 3 commits into
mainfrom
feat/qr-center-logo
Sep 23, 2026
Merged

jvsena42 merged 3 commits into
mainfrom
feat/qr-center-logo

Conversation

@jvsena42

Copy link
Copy Markdown
Owner

A deck or profile QR now carries the app icon in its centre, so a code on someone's screen reads as a Loopky link before it is scanned rather than as an anonymous square. Sign-in and Lightning codes are untouched — their payloads are dense one-shot credentials with nothing to brand.

What it costs, and why it is safe

The mark destroys the modules under it, so both platforms raise the correction level from M to H whenever a mark is drawn: H recovers ~30% of the code, and a 24% plate covers ~6% of its area. That margin is measured rather than asserted — the shared PNG was decoded back with zxing at 816, 400, 240, 160 and 120px, the last being about two pixels per module. Widening the plate without moving the level is how this silently stops scanning.

Two things the platform gets wrong if left to it

  • The launcher foreground is drawn inside the adaptive-icon safe zone, so a fifth of every edge is transparent. It is trimmed to its own alpha bounds rather than scaled by a hardcoded factor, so redrawing the icon cannot quietly shrink the mark to two thirds of its plate.
  • decodeResource picks the device's own density bucket, but the shared PNG's plate is 173px everywhere — an mdpi phone would upscale 60px of fox into it and send a soft mark that nothing on that device shows. The xxxhdpi art is asked for by name.

Each platform uses its own launcher art rather than a shared asset, so the mark in the code matches the icon on the home screen either side.

Verification

Driven on emulator-5554 against staging at both the compact and expanded width classes: deck share, profile share, the attached PNG and the four downscales all decode to the exact URI. :androidApp:assembleDebug and detektAll pass. journeys/RESULTS.md has the table.

iOS is unverified. This was done on a Linux box, so no Swift here was compiled, let alone driven — the change mirrors the Android one and follows the file's existing patterns, but it needs a Mac before merge.

jvsena42 and others added 3 commits September 23, 2026 08:02
A deck or profile code now carries the mark, so a code on someone's screen
reads as a Loopky link before it is scanned rather than as an anonymous
square.

The mark destroys the modules under it, so `qrBitmap` raises the correction
level from M to H whenever one is passed: H recovers ~30% of the code and a
24% plate covers ~6% of its area. Decoded back at 816, 400, 240, 160 and
120px to confirm the margin is real. Sign-in and invoice codes pass no mark
and stay at M — their payloads are dense one-shot credentials with nothing
to brand.

Two things the platform gets wrong if left to it. The launcher foreground is
drawn inside the adaptive-icon safe zone, so it is trimmed to its own artwork
rather than scaled by a hardcoded factor. And the xxxhdpi art is asked for by
name: the shared PNG's plate is 173px on every device, so an mdpi phone would
otherwise upscale 60px of fox into it and send a soft mark that nothing on
that device shows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`QrCodeView` gains `showsMark`, which draws the launcher fox on a white disc
over the centre and moves the correction level from M to H for the same
reason as Android: the plate destroys the modules under it, and H recovers
~30% against the ~6% a 24% plate covers.

Each platform uses its own launcher art rather than a shared asset, so the
mark in the code matches the icon on the home screen either side.

`shareImage` restores `interpolationQuality` to `.high` before drawing the
fox — the `.none` above it is set for the modules, and the artwork comes out
visibly stepped under it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jvsena42
jvsena42 merged commit 913c732 into main Sep 23, 2026
8 checks passed
@jvsena42
jvsena42 deleted the feat/qr-center-logo branch September 23, 2026 11:08
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