-
public interface AppDNAScreenDelegateSPEC-070-A B.6 — Server-driven screen lifecycle delegate.
Mirrors iOS
AppDNAScreenDelegate(AppDNA+Delegates.swift:78-83). The fourth method (onScreenAction) returnsBooleanfor veto/intercept —falseprevents default handling so hosts can fully replace the action behavior.All methods have default implementations so hosts can implement only the callbacks they care about.
Hosts register via ScreenManager.shared.setDelegate.
-
-
Method Summary
Modifier and Type Method Description UnitonScreenPresented(String screenId)Called immediately after a screen has been presented. UnitonScreenDismissed(String screenId, Map<String, Object> result)Called when a screen is dismissed. UnitonFlowCompleted(String flowId, Map<String, Object> result)Called when a flow finishes (completed OR abandoned). BooleanonScreenAction(String screenId, Map<String, Object> action)SPEC-070-A B.6 — veto hook. -
-
Method Detail
-
onScreenPresented
Unit onScreenPresented(String screenId)
Called immediately after a screen has been presented.
-
onScreenDismissed
Unit onScreenDismissed(String screenId, Map<String, Object> result)
Called when a screen is dismissed. result mirrors iOS
ScreenResultshape: keys includescreen_id,dismissed,responses,last_action,duration_ms, optionalerror.
-
onFlowCompleted
Unit onFlowCompleted(String flowId, Map<String, Object> result)
Called when a flow finishes (completed OR abandoned). result mirrors iOS
FlowResult: keys includeflow_id,completed,last_screen_id,responses,screens_viewed,duration_ms, optionalerror.
-
onScreenAction
Boolean onScreenAction(String screenId, Map<String, Object> action)
SPEC-070-A B.6 — veto hook. Return
falseto intercept the action and prevent the SDK's default handling (e.g. so the host can perform its own navigation, render its own paywall, etc). Returntrue(default) to let the SDK process the action normally.action keys mirror iOS
SectionActionpayload:type(e.g."navigate","deep_link","show_paywall","track","custom"), plus type-specific fields (target_screen_id,url,paywall_id,event_name,event_properties,value, etc).
-
-
-
-