#Usage with Compose

The Access SDK comes with a few handy composables to ease the integration of paywalls compared to the traditional view-based approach.

#Example

#Snippet/RestrictedContent mode

#Custom mode

#Composables

#AccessProvider

#Params

  • appId {String} Your Poool App ID
  • config {Map<String, Any?>} (optional) Default configuration (see the configuration documentation).
  • styles {Map<String, Any?>} (optional) Default styles (see the styles documentation).
  • texts {Map<String, String?>} (optional) Default texts (see the texts documentation).
  • variables {Map<String, Any?>} (optional) Default variables (see the variables documentation).
  • content {@Composable () -> Unit}

#Example

#Snippet

#Params

  • id {String} (optional) If multiple paywalls are used, this ID will be used to link the snippet to the paywall
  • content {@Composable () -> Unit}

#Example

#RestrictedContent

#Params

  • id {String} (optional) If multiple paywalls are used, this ID will be used to link the content to the paywall
  • content {@Composable () -> Unit}

#Example

#Paywall

#Params

  • id {String} (optional) If multiple paywalls are used, this ID will be used to link the paywall to the corresponding snippet and the restricted content
  • pageType {String} (optional, default: "premium") Current page type (supported types: page, premium, free, subscription)
  • mode {PaywallModes} (optional, default: PaywallMode.SNIPPET) Way to hide content (see the mode configuration option documentation). Supported modes: PaywallMode.BOTTOM_SHEET, PaywallMode.SNIPPET, PaywallMode.CUSTOM.
  • config {Map<String, Any?>} (optional) Paywall configuration (see the configuration documentation).
  • styles {Map<String, Any?>} (optional) Paywall styles (see the styles documentation).
  • texts {Map<String, String?>} (optional) Paywall texts (see the texts documentation).
  • variables {Map<String, Any?>} (optional) Paywall variables (see the variables documentation).
  • onLock {() -> Unit} (optional) Callback fired when the paywall is locked
  • onRelease {() -> Unit} (optional) Callback fired when the paywall is released

#Example