Skip to content

docs: lifecycle events README section [4/4]#33

Open
choudlet wants to merge 2 commits into
chrish/sc-38235/lifecycle-wiring-openurlfrom
chrish/sc-38236/lifecycle-readme
Open

docs: lifecycle events README section [4/4]#33
choudlet wants to merge 2 commits into
chrish/sc-38235/lifecycle-wiring-openurlfrom
chrish/sc-38236/lifecycle-readme

Conversation

@choudlet

Copy link
Copy Markdown
Collaborator

Shortcut: sc-38236
Parent: sc-36799
iOS reference: sc-38231
Slice 4 of 4 — README documentation. No behavior change.

Stacked on #32 (sc-38235). Merge sc-38233 + sc-38234 + sc-38235 first; this PR will retarget to main automatically.

Summary

User-facing documentation for the lifecycle-events feature shipped by slices 1–3.

  • New top-level ## Lifecycle Events section with the four-event table, cold-launch sequencing, persistence semantics, and rationale for cold-launch suppression on background-launched processes (silent push, JobScheduler, etc.).
  • Opt-in framing: trackLifecycleEvents defaults to false, sample of how to enable, note that openURL(...) is a no-op when disabled.
  • Deep-link wiring snippets for Activity.onCreate / onNewIntent and App Links via verified intent filters.
  • Privacy guidance with a URL-sanitization sample (auth tokens, OTPs, magic-link query params).
  • "Why no auto-instrumentation" rationale (no manifest mutation, no ActivityLifecycleCallbacks proxy, host control).
  • TOC entry and openURL listed in the Analytics Interface API ref.

Stack

  1. sc-38233 — storage + bundle metadata foundation
  2. sc-38234 — LifecycleEventTracker algorithm + tests
  3. sc-38235 — wiring + openURL public API
  4. this PR — README documentation

Test plan

  • README renders correctly on GitHub
  • All anchors resolve (TOC link → ## Lifecycle Events section)
  • ./gradlew :metarouter-sdk:test still passes (no behavior change)

@choudlet choudlet mentioned this pull request Apr 27, 2026
5 tasks
@choudlet choudlet force-pushed the chrish/sc-38235/lifecycle-wiring-openurl branch from 382bcd4 to 4e7a426 Compare April 27, 2026 21:58
Adds the user-facing documentation for the lifecycle events feature
shipped by sc-38233 / sc-38234 / sc-38235.

- Top-level Lifecycle Events section with the four events table,
  cold-launch sequencing rules, persistence semantics, and the
  rationale for cold-launch suppression on background-launched
  processes (silent push, JobScheduler, etc.)
- Opt-in framing: trackLifecycleEvents defaults to false, sample of
  how to enable, note that openURL is a no-op when disabled
- Deep-link wiring snippets for Activity.onCreate / onNewIntent and
  App Links via verified intent filters
- Privacy guidance with a URL-sanitization sample (auth tokens,
  OTPs, magic-link params)
- 'Why no auto-instrumentation' rationale (no manifest mutation, no
  ActivityLifecycleCallbacks proxy, host control)
- TOC entry and openURL listed in the Analytics Interface API ref

Refs: sc-38236
Slice 4 follow-ups from code review.

- Activity entry-point snippet: drop the misleading
  intent.getStringExtra(Intent.EXTRA_REFERRER) suggestion. EXTRA_REFERRER
  is documented as a Uri, not a String, so the String overload always
  returns null. Use Activity.referrer?.host (the canonical API) instead.
- Add an explicit imports block to the Activity snippet so it's
  copy-paste-runnable.
- Soften intent.data!! in the privacy sample to a guarded let — a
  privacy-themed example shouldn't crash on a bare bang.
- Add the android.net.Uri import to the sanitize() snippet for the same
  reason.

Refs: sc-38236
@choudlet choudlet force-pushed the chrish/sc-38236/lifecycle-readme branch from e6482b0 to fb9ad90 Compare April 27, 2026 22:00
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.

1 participant