Package 

Object AegisInAppManager

    • Method Detail

      • setCurrentSurface

         final Unit setCurrentSurface(String surfaceKey)

        In-App Surface Filter tracker — declare the canonical placement surface for in-app targeting (e.g. "bill", "storefront_catalog"). Only the 8 canonical keys are captured; other names are ignored so an arbitrary screen name never poisons the gate. Threads current_surface on the next fetch and gates render client-side. Wired from Aegis.screen(name) and callable directly by hosts.

      • setCurrentScreen

         final Unit setCurrentScreen(String name)

        Dynamic Screens P2 — capture the RAW screen name (no enum filter) for free-form target_screens matching. Set from Aegis.screen(name).

      • acknowledgeCampaign

         final Unit acknowledgeCampaign(String campaignId, String action)

        React Native bridge ack entry point (manager-side gap closed 2026-06-01). The RN facade calls acknowledgeCampaign(stepExecutionId, action) with the JS action vocab (displayed|dismissed|clicked); this maps that onto the native vocab (viewed|dismissed|clicked), finds the queued widget by id, and routes through the existing private acknowledgeWidget(...) so journey-vs-catalog routing + retry are preserved. Falls back to postCatalogEvent when the widget has already been dequeued so the event still lands. Additive — no existing caller of acknowledgeWidget changes.

      • emitInteractiveEvent

         final Unit emitInteractiveEvent(String subType, String eventName, Map<String, Object> payload)

        Push an interactive event to the registered callback (if any). Called by the interactive renderer when a user interaction completes (NPS submit, quiz answered, spin won, etc.). Canonical event names mirror Flutter's widget.<type>.<event> and the drift contract (ios-sdk/Tests/drift/inapp-interactive-bridge-contract.json).

      • onAppResume

         final Unit onAppResume()

        Call from Activity.onResume() or ProcessLifecycleOwner ON_RESUME. Refreshes widget queue as fallback when SSE was disconnected while backgrounded.

      • notifyConversion

         final Unit notifyConversion(String goalName)

        Conversion-aware mass-suppression. Call when the host app observes a goal event (purchase, order_placed, checkout_completed, or any workspace-configured custom goal).

        For every queued widget whose frequency_cap.suppress_after_conversion_seconds is set, the queue evaluation paths (getQueuedWidgets, displayWidgetOnTrigger) skip the widget until expiry.

        Persisted across host-app launches via SharedPreferences so a conversion fired in session N silences eligible widgets in session N+1.

        Web parity — libs/web-sdk/src/inapp/AegisInAppManager.ts:438.

        Safe to call repeatedly for the same goal.

      • getOnInteractiveEvent

         final Function3<String, String, Map<String, Object>, Unit> getOnInteractiveEvent()

        Interactive widget event callback (manager-side gap closed 2026-06-01). Mirrors the Flutter emitInteractiveEvent / onInteractiveEvent shape (libs/mobile-sdk/flutter-sdk/lib/in_app/aegis_in_app.dart). The interactive renderer (InAppInteractiveRenderer) calls emitInteractiveEvent when a user interaction completes; the RN bridge sets this callback to forward the {subType, eventName, payload} envelope to JS via the onInteractiveEvent RCTDeviceEventEmitter event. Cleared by the bridge on disconnect. Additive — null by default, so non-RN hosts are unaffected.

      • setOnInteractiveEvent

         final Unit setOnInteractiveEvent(Function3<String, String, Map<String, Object>, Unit> onInteractiveEvent)

        Interactive widget event callback (manager-side gap closed 2026-06-01). Mirrors the Flutter emitInteractiveEvent / onInteractiveEvent shape (libs/mobile-sdk/flutter-sdk/lib/in_app/aegis_in_app.dart). The interactive renderer (InAppInteractiveRenderer) calls emitInteractiveEvent when a user interaction completes; the RN bridge sets this callback to forward the {subType, eventName, payload} envelope to JS via the onInteractiveEvent RCTDeviceEventEmitter event. Cleared by the bridge on disconnect. Additive — null by default, so non-RN hosts are unaffected.