-
public class AegisWebViewBridge.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final StringTAGprivate final StringBRIDGE_INTERFACE_NAMEprivate final List<String>bridgeMethodsprivate final StringinstallScriptpublic final static AegisWebViewBridge.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitattach(WebView webView)Attach the bridge to a WebView. final StringgetTAG()final StringgetBRIDGE_INTERFACE_NAME()Single JavascriptInterface name. final List<String>getBridgeMethods()Method names exposed by the bridge. final StringgetInstallScript()One-time JavaScript injection that installs window.aegis.*in the webview's global scope.-
-
Method Detail
-
attach
final Unit attach(WebView webView)
Attach the bridge to a WebView. Enables JavaScript on the webview (required) and registers the AegisBridge interface + an onPageStarted hook that injects the install script.
-
getBRIDGE_INTERFACE_NAME
final String getBRIDGE_INTERFACE_NAME()
Single JavascriptInterface name. JS calls
window.AegisBridge.postMessage(JSON.stringify({...})).
-
getBridgeMethods
final List<String> getBridgeMethods()
Method names exposed by the bridge. Pinned by the cross-SDK webview-bridge-contract.json to keep iOS + Android aligned with the web SDK's public API.
-
getInstallScript
final String getInstallScript()
One-time JavaScript injection that installs
window.aegis.*in the webview's global scope. Each bridged method serialises its arguments to JSON and posts a single message back to the native AegisBridge interface.
-
-
-
-