-
public final class AegisWebViewBridgeBridge for android.webkit.WebView-hosted web content. Mirrors the web SDK's public
aegis.*namespace inside the webview so a customer who embeds their web storefront in a native Android app does NOT have to dual-instrument (web SDK + native SDK). All events from the webview flow through the host app's native SDK transport.Usage:
val webView = WebView(context) AegisWebViewBridge.attach(webView) webView.loadUrl("https://shop.your-brand.com")Once attached, the loaded HTML can call:
window.aegis.track('product_viewed', { sku: 'L_001' }); window.aegis.identify('user_42', { plan: 'gold' }); window.aegis.screen('checkout'); window.aegis.page('/cart'); window.aegis.group('group_abc', { tier: 'gold' }); window.aegis.alias('legacy_id_99'); window.aegis.reset();Cross-SDK parity with iOS AegisWebViewBridge. Bridge method set is pinned by the shared
libs/mobile-sdk/ios-sdk/Tests/drift/webview-bridge-contract.json.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAegisWebViewBridge.Companion
-
Method Summary
Modifier and Type Method Description final UnitpostMessage(String jsonBody)JavaScript-side calls land here. -
-
Method Detail
-
postMessage
final Unit postMessage(String jsonBody)
JavaScript-side calls land here. Body shape: { method: "track" | "identify" | ..., args: ... }
-
-
-
-