Skip to content

docs(forms): add form lifecycle events section to README#446

Merged
evan-masseau merged 2 commits intorel/4.4.0from
ecm/lifecycle-hooks-readme
May 5, 2026
Merged

docs(forms): add form lifecycle events section to README#446
evan-masseau merged 2 commits intorel/4.4.0from
ecm/lifecycle-hooks-readme

Conversation

@evan-masseau
Copy link
Copy Markdown
Contributor

Summary

Documents the FormLifecycleEvent API that shipped in #434 (feat(iaf) Android in-app form lifecycle hook support). This is the Android companion to klaviyo-swift-sdk #517.

  • Adds a new ### Monitoring Form Lifecycle Events section after the In-App Forms session config / unregister content and before Geofencing
  • Adds a TOC entry and feature matrix row (Form Lifecycle Hooks | 4.4.0)
  • Covers registration, threading guarantee (main thread), per-event semantics (FormCtaClicked deep-link-only, FormDismissed user-initiated only), and unregistration
  • Includes Kotlin (expanded) and Java (collapsed) code blocks
  • Example snippet compile-verified via :sample:assembleDebug — the sample app already demonstrates the API in SampleApplication.kt

Checklist

  • README or migration guide changes
  • New public APIs
  • Unit tests
  • Integration/sample app changes (sample already wired, no net change needed)

Notes

Planned for the 4.4.0 release. No code changes — pure documentation.

Android API quirks relative to iOS (see cross-platform notes in PR description of #517):

  • deepLinkUrl is typed as android.net.Uri (non-nullable), not String — callers need .toString() to pass it to string-based analytics SDKs
  • Only one handler can be registered at a time (replaces on re-registration), same as iOS
  • Threading guarantee is explicitly documented in FormLifecycleHandler.kt KDoc: main thread, callbacks fire after the SDK has already acted (presentation/dismissal/navigation already initiated)

evan-masseau and others added 2 commits May 4, 2026 20:14
Documents the FormLifecycleEvent API introduced in PR #434, including
registration/unregistration, threading guarantee, and per-event semantics.
Adds a feature matrix row and TOC entry. Example verified via
:sample:assembleDebug.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Trim 'fires only when CTA has deep link' and 'does not fire on internal teardown'
notes — these are translation-layer artifacts, not behavior worth highlighting in
docs aimed at integrators.
@evan-masseau evan-masseau marked this pull request as ready for review May 5, 2026 14:23
@evan-masseau evan-masseau requested a review from a team as a code owner May 5, 2026 14:23
@klaviyoit klaviyoit requested a review from ajaysubra May 5, 2026 14:37
Copy link
Copy Markdown
Contributor

@ajaysubra ajaysubra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@evan-masseau evan-masseau merged commit fd5734d into rel/4.4.0 May 5, 2026
15 checks passed
@evan-masseau evan-masseau deleted the ecm/lifecycle-hooks-readme branch May 5, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants