Closed carlpoole closed 1 year ago
Adds Web Vitals support for FCP, FID, and TTFB to Android Portals
portalFragment = PortalFragment(checkoutPortal, (metric, time) -> { Log.d("VITALS", "$metric: ${time}ms" });
portalFragment = new PortalFragment(checkoutPortal, (metric, time) -> { Log.d("VITALS", metric.name() + ": " + time+ "ms"); return null; });
@Composable fun loadPortal(portalId: String) { AndroidView(factory = { PortalView(it, portalId) { metric, time -> Log.d("VITALS", "$metric: ${time}ms") } }) }
Adds Web Vitals support for FCP, FID, and TTFB to Android Portals
Kotlin Usage
Java Usage
Jetpack Compose example usage