Hi AI MeetingPublic meetingMy meetingsShelfStatsBlog

HI AI MEETING · Dev notes

Our Android App Loads the Web App Directly

The Hi AI Meeting Android app does not rebuild its screen UI. A Capacitor shell loads the production web app directly. This is a record of that trade-off, how we handled system bars and native features, and what was and was not verified on the emulator.

By Hi AI Meeting 운영팀21 min read

When Hi AI Meeting opens on Android, it shows the production web app rather than a separate set of native screens. Meeting creation, the live meeting room, minutes, and public meetings continue to use the existing web UI. Native features such as payments connect through the app shell.

That means a web deployment changes the app screens immediately. It also means the app cannot work without a network connection. Meetings depend on the server calling several AI models, so offline operation was out of scope from the beginning.

This post records why we kept one web app, the constraints that came with that decision, and what the emulator check on 2026-10-24 did—and did not—verify.

Why we did not rebuild the screens

We had two options when preparing the Android app. We could bundle the web build inside the app, or make the WebView open the live production address directly.

We chose to load the production web origin. As a result, the app uses the same login session (HttpOnly cookies), UI language and strings for all 10 languages, public/private meeting boundaries, meeting-room SSE stream, and /api/* calls as the web service.

The app bundle contains only a blank placeholder page for web content, and it has no service worker. A new app build is needed only when the shell changes: for example, when the origin address, app version, ad SDK app ID, or native plugins change.

Capacitor documents server.url mainly for live reload and does not recommend it for production. We were aware of that warning. We still chose the benefit of maintaining one web app, then handled the necessary consequences in the shell.

What capacitor.config.ts does

The configuration file is the center of the app shell. This is the relevant portion of the actual file.

const config: CapacitorConfig = {
  appId,
  appName: 'Hi AI Meeting',
  webDir: 'www',
  appendUserAgent: 'MPMApp',
  server: {
    url: webOrigin,
    cleartext: build === 'debug',
    allowNavigation: [new URL(webOrigin).hostname],
  },
  plugins: {
    SystemBars: { insetsHandling: 'native' },
  },
};

When server.url is set, Capacitor opens that address instead of the bundle in webDir. allowNavigation compares host names, so we pass new URL(...).hostname.

There are debug and release builds. Debug needs to connect to a local http server, so it enables cleartext. Android blocks plain http by default from API 28 onward.

Release accepts https origins only. If an http origin reaches release configuration, the build stops. Opening http while cleartext is disabled leaves the app on a blank screen.

Release also requires a package name. If it is empty, the build fails instead of inventing a plausible temporary name. A store package name cannot be changed after upload, so this prevents an accidental temporary name from becoming permanent.

How the MPMApp token separates app and web

The app and web can share screens while still needing different behavior. Free meetings that start after watching an ad are one example. We decided that this feature would be available in the app but disabled on the web, so the server needs to identify the request surface.

We use appendUserAgent: 'MPMApp' for that. Capacitor appends the string to the original WebView User-Agent. Because this is not a header added later by page scripts, it is present on the first HTML request as well. The server-rendered (SSR) first screen can therefore show app-specific guidance.

The server-side check is as follows.

export const APP_USER_AGENT_TOKEN = 'MPMApp';
const APP_TOKEN_PATTERN = new RegExp(`\\b${APP_USER_AGENT_TOKEN}\\b`, 'u');

export function clientSurfaceFromUserAgent(userAgent: string | readonly string[] | undefined): ClientSurface {
  const value = typeof userAgent === 'string' ? userAgent : (userAgent ?? []).join(' ');
  return APP_TOKEN_PATTERN.test(value) ? 'app' : 'web';
}

This value selects separate free-meeting operation switches for web and app (2026-10-24). The admin screen therefore has two switches.

The User-Agent is not a security boundary. Anyone can alter it, so the token decides only which switch to read and which guidance to display.

A free meeting is actually granted by the signed verification callback that the ad provider sends to our server. Imitating the token on the web does not create that verification record without going through the app’s ad SDK. The token alone therefore cannot start a free run.

We fixed system bars in the shell, not by changing the web

The first issue we checked in the emulator was the system bars. On Android 15 (API 35) and later, apps targeting SDK 35 or above draw edge-to-edge by default. A web page can extend behind the status bar and navigation or gesture bar, potentially hiding controls near the bottom.

A web-side solution would use viewport-fit=cover and env(safe-area-inset-*) padding. We did not take that route because the web is also used unchanged in phone browsers. Changing spacing rules across every web screen for the app could affect the whole web experience.

Instead, we decided that the web would not enable viewport-fit=cover, and assigned inset handling to the app shell.

In Capacitor 8, SystemBars behaves differently depending on insetsHandling.

ValueBehavior
nativeWebView below 140: pads the WebView by the system bar sizes and sets env(safe-area-inset-*) to 0. 140 and above: follows the page’s viewport-fit value
css (default)Same as native, plus --safe-area-inset-* CSS variables containing the exact inset values
disableTurns handling off. The layout can break unless you handle insets yourself

The official documentation explains that Android WebViews below 140 do not report safe-area env values correctly. native and css work around that issue. At WebView 140 and above, behavior follows the page’s viewport-fit condition instead.

Our web layout does not depend on safe-area variables, so we specified native rather than css, which adds those variables. This did not require any additional native code.

On the emulator (API 36, 412dp wide), the WebView height was 839 CSS px with gesture navigation and 815 CSS px with 3-button navigation. In both cases, the new-meeting dialog’s close button, the “Start meeting” button, and the meeting room’s bottom action bar were not obscured by the system bars.

That result was verified on one emulator only. We have not yet checked a physical device. Because the conditions change at WebView 140 and above as shown in the table, those same three areas—the close button, “Start meeting,” and the bottom action bar—need to be checked again when a physical device is available.

We kept native code only where it is needed

Only features the web cannot handle remain in native plugins. But plugin code existing is different from a web screen actually calling that plugin. The table separates wiring from verification.

AreaWhat it usesWired from the webVerified so far
Rewarded adsAdMobWired. Opens only on the app surface; the payout basis is the signed verification callback received by the serverTest ad flow and signature verification confirmed on the emulator. End-to-end payout for production ad units remains unverified
PaymentsGoogle Play BillingWired. The in-app payment screen switches to store billing, and the server checks the receipt with PlayPlay products are not yet registered or mapped, so real payments are unverified
App linksShare link → app screenReception code is wired; domain verification is incompleteThe domain verification file location exists but currently contains an empty list. It will be filled after package and signing registration
Meeting-complete pushPush notificationsOnly permission, registration, and notification-tap handling are implemented in the app shell sourceWeb wiring and on-device receipt are unverified
ShareNative share sheetImplemented only in the app shell source. The actual share screen uses the web standard navigator.share()—

The remote-origin structure introduced an implementation trap. TypeScript code in the app shell is not loaded into the remote WebView page. The web code makes the actual calls by looking up the bridge Capacitor injects as window.Capacitor.Plugins.<name>.

That proxy’s addListener can return a handle directly instead of a Promise. We initially assumed it always returned a Promise and chained .then. On the emulator, that caused the entire screen to become an error after login.

// Before: assumed the result is always a Promise — fails when a handle is returned directly (no .then)
void app.addListener('appUrlOpen', ({ url }) => { /* ... */ }).then((value) => { /* ... */ });

// After: fold both shapes into one Promise
void listenerHandle(app.addListener('appUrlOpen', ({ url }) => { /* ... */ })).then((value) => { /* ... */ });

export function listenerHandle(result: ListenerResult): Promise<PluginListenerHandle> {
  return Promise.resolve(result);
}

(Abridged from the before/after in apps/web/components/NativeAppLinks.tsx and apps/web/lib/native_app.ts)

Promise.resolve returns a Promise unchanged and wraps a plain value in a resolved Promise. That one line handles both return shapes. We used the same function for the rewarded ad dismissal event.

The image pre-caching module exists, but app wiring remains

The meeting room contains many persona avatar images, so we created an image pre-caching module in the app shell. Fixed assets such as icons go into the app bundle. Changing assets such as avatars are designed to be downloaded once, stored on the device, and served from local copies.

Each filename includes a version number. When the list changes to a new version, only changed file paths are absent from storage, so only those files are downloaded again. Files removed from the list are deleted. When count or storage limits are exceeded, the least recently used files are removed first.

A one-off test using fake transport and storage counted 882 requests on first launch and 0 on re-entry. Only the 5 files with changed versions were requested again, and fixed assets generated 0 requests. These were not measurements from a real device network.

The remaining problem is the same remote-origin structure described above. App shell code is not loaded into the remote WebView page. In the current repository, we could not find either a call to this module from the actual app startup path or wiring that lets the remote page read local copies.

In other words, the module and test exist, but we cannot say that current app image rendering uses it. A wiring approach that fits the remote-origin structure remains to be implemented.

What was verified and what remained as of 2026-10-24

We created the shell and image pre-caching module on 2026-09-29. On 2026-10-24, we added release build configuration, rewarded ads, and Play Billing code. On the emulator, we checked the production web, system bars, test ad flow, and signature verification. We confirmed that the app loaded the production origin and rendered the public home page.

As of 10-24, the emulator-confirmed items were loading the production web, the MPMApp surface, system bar handling, the test ad flow, and signature verification.

Image pre-caching, push, and native sharing had code but still required wiring and verification. Store-side work still pending included the package name, upload signing key, registration of the signed callback address for ad units and production payout verification, Play product registration and mapping, the push configuration file, and app-link verification fingerprints. System bar handling across multiple physical devices and WebView versions, along with real payments, had not yet been verified.

The app was not in the store at the time of the 2026-10-24 check. On 2026-10-26, version 1.0.1 entered the Google Play internal testing track, and the package name was settled then. That process is covered in What Play Console Asked Before Internal Testing. Checks that require a physical device, including production ad payouts, are the next step.