Skip to content

Updates for android#266

Merged
JacobCoffee merged 7 commits intomainfrom
android
Apr 24, 2026
Merged

Updates for android#266
JacobCoffee merged 7 commits intomainfrom
android

Conversation

@JacobCoffee
Copy link
Copy Markdown
Member

Found some issues testing in android:

  • Fixes some UI issues
  • Bump version
  • Fix dev mode
  • Update dep for cal

The @ebarooni/capacitor-calendar plugin was added in #200 but the
Android native bindings were never synced. Catch up via `npx cap sync
android` so the plugin registers on Android builds.
The Android emulator runs in a QEMU VM with its own network stack, so
baseUrl 127.0.0.1:8000 in the dev environment resolved to the emulator
itself and the schedule could never load. iOS simulator shares the host
network namespace so it did not hit this.

Detect the platform at module load via Capacitor.getPlatform() and
substitute 10.0.2.2 on Android — the emulator's documented alias for
the host loopback — so `ionic cap run --configuration=development`
reaches the local pycon server on both platforms without any per-run
adb reverse.
The backend returns speaker photos as site-relative paths such as
/2026/media/speaker_photos/3.webp.256x256_q85.jpg. Rendering those in
an <img src> resolves them against the document origin, which is fine
in production (origin == us.pycon.org == the API host) but breaks under
ionic livereload, where the origin is the dev server (e.g.
10.0.2.2:8100) and cannot serve media files.

Normalize photo URLs to absolute when processing the schedule so images
load regardless of the WebView origin. Absolute http(s) URLs are passed
through unchanged, so existing S3-backed headshots still work.
Ionic's MD mode applies vertical margin only to ion-icon[slot="start"],
not to raw <img slot="start">. The Bluesky, X, and PyPI rows therefore
rendered shorter than the ion-icon rows on Android, producing visible
spacing inconsistency in the Social Media list. iOS mode was unaffected
because its flex layout centers start-slot content without relying on
margin.

Add align-self: center and 12px block margins to .social-icon so the
img-based items match ion-icon row height on both platforms.
Google Play Console rejects production releases whose native libraries
are not aligned for 16 KB memory pages. Verified against the built AAB:
the offending library was libimage_processing_util_jni.so, shipped by
androidx.camera. @capacitor-mlkit/barcode-scanning pins CameraX to
1.1.0 (2022), whose LOAD segments are 4 KB-aligned (2**12). CameraX
1.4.0+ emits 16 KB-aligned native libs (2**14).

The MLKit plugin reads each CameraX artifact version from
rootProject.ext, so overriding here propagates without patching
node_modules. Post-bump AAB inspection via objdump confirms all three
native libraries (libbarhopper_v3, libimage_processing_util_jni,
libsurface_util_jni) are 16 KB-aligned.
@JacobCoffee JacobCoffee merged commit 3302ae8 into main Apr 24, 2026
2 checks passed
@JacobCoffee JacobCoffee deleted the android branch April 24, 2026 18:43
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