SubscriptionOnboardingStepPlugin

A single step in the native subscription onboarding flow, contributed from the feature module that owns the step (e.g. the VPN step lives in the VPN module, the Duck.ai step in the Duck.ai module). Each feature module contributes one implementation as a multibinding; the host in subscriptions-impl collects them, orders them (by @PriorityKey), and turns them into linear-onboarding steps.

Keeping this contract framework-agnostic (just a Fragment factory + an id) is what lets a step live in a different -impl module: the host never names the concrete Fragment class.

Properties

Link copied to clipboard
abstract val stepId: String

Stable id for this step. Also the key used to persist completion.

Link copied to clipboard
abstract val titleResId: Int

Title shown in the host's toolbar while this step is on screen.

Functions

Link copied to clipboard
abstract fun createFragment(): Fragment

Creates the full-screen Fragment for this step. Dagger injection happens when it attaches to the host.

Link copied to clipboard
abstract suspend fun shouldShow(): Boolean

Whether this step should be shown to the current user (e.g. gated by feature flag / entitlement). Skipped when false.