Android Bridge

"/home/yossef/notes/git/projects/maplibra/modules/Android Bridge.md"

path: maplibra/modules/Android Bridge.md

- **fileName**: Android Bridge
- **Created on**: 2026-06-16 00:48:42

Android Bridge

Purpose: Enables the web app to communicate with an Android WebView host.

Related: ../Home.md, ../Architecture.md, ./UI Components.md, ./Bootstrap System.md

What It Does

The Android bridge provides bidirectional communication between the web app and a native Android app embedding it in a WebView. It is used for floor state synchronization, native control rendering, and error reporting.

Bridge Detection

src/app/android-bridge.js detects the bridge via window.AndroidBridge:

Floor State Sync

When floors change or the current floor changes:

Map Ready Signals

Native Controls

When shouldUseNativeControls() is true:

Important Files

How It Connects