The Poool Access Android SDK enables the integration of dynamic paywalls to control access to app content. It offers the same features as the iOS SDK, including multiple display modes (modal, inline, custom view).
Paywall templates and the user journey are fully editable from the Poool dashboard, within your dedicated application.
You can also find our integration documentation on GitHub 👉 React Native
Installing the Android SDK
Installing the Poool Access library is simple via Gradle.
Using standard Gradle
Add the following dependency to your build.gradle
file :
implementation("tech.poool:access-android:1.2.0")
Using the Versions Catalog
If you use a versions catalog (libs.versions.toml
), add:
[libraries]
access-android = {
group = "tech.poool",
name = "access-android",
version.ref = "accessAndroid"
}
Then in your Gradle files:
gradleCopierModifierimplementation(libs.access.android)
Usage with Jetpack Compose
The SDK is primarily designed for Jetpack Compose. It provides several composables that make paywall integration easier in a modern app.
Snippet / RestrictedContent Mode
This mode relies on two main components:
Snippet
: content visible while the wall is active.RestrictedContent
:
full content displayed after the wall is unlocked.
Example :
@Composable
fun App() {
AccessProvider(
appId = "<your_app_id>",
config = mapOf(
"debug" to true,
"cookiesEnabled" to true
)
) {
Snippet {
Text("Content visible before unlocking the wall")
}
RestrictedContent {
Text("Full content displayed after unlocking")
}
Paywall(pageType = "premium")
}
}
Custom Mode
If you want more precise control over the display, you can manually manage the wall release state:
@Composable
fun App() {
var isReleased by remember { mutableStateOf(false) }
AccessProvider(
appId = "<your_app_id>",
config = mapOf(
"debug" to true,
"cookiesEnabled" to true
)
) {
if (!isReleased) {
Text("Content visible before unlocking")
} else {
Text("Full content displayed after unlocking")
}
Paywall(
pageType = "premium",
mode = PaywallMode.CUSTOM,
onRelease = { isReleased = true }
)
}
}
Main Composables
AccessProvider
:
the root component that wraps all your paywalled content. It accepts configuration parameters, styles, texts, and variables.Snippet and RestrictedContent
:
to respectively display content before and after unlocking.Paywall
: to configure the wall (page type, display mode, callbacks, etc.).
Paywall Display Modes
The Paywall
composable allows you to specify the wall's display mode via the mode
property. This controls how the content is restricted and how the user experience is managed. Three modes are currently available:
PaywallMode.SNIPPET
(default)
: used with theSnippet
andRestrictedContent
composables. Full content is hidden while a teaser remains visible.PaywallMode.BOTTOM_SHEET
: displays the paywall in a modal bottom sheet. Ideal for a more intrusive and focused experience without hiding the underlying content.PaywallMode.CUSTOM
: gives full control to the app. Content is shown or hidden manually, typically via a variable likeisReleased
.
Example using BOTTOM_SHEET
mode:
@Composable
fun App() {
Paywall(
pageType = "premium",
mode = PaywallMode.BOTTOM_SHEET
)
}
Example using CUSTOM mode with callback:
@Composable
fun App() {
Paywall(
pageType = "premium",
mode = PaywallMode.CUSTOM,
onRelease = { isReleased = true }
)
}
Each mode allows you to tailor the paywall behavior to the user experience you want to create, from simple content teasing to more aggressive conversion strategies.
Usage with the View System (Legacy)
Even though the SDK targets Compose, it remains compatible with XML views. Integration is done via the Access
class, which dynamically injects a paywall into a ViewGroup
.
Example in Kotlin :
class MainActivity : AppCompatActivity() {
private var access: Access? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
access = Access("<your_app_id>", this)
access?.config(
mapOf(
"debug" to true,
"cookiesEnabled" to true
)
)
val content = findViewById<LinearLayout>(R.id.content)
access?.createPaywall(
pageType = "premium",
percent = 80,
viewGroup = content
)
}
}
XML Layout :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Content partially hidden by the paywall" />
</LinearLayout>
</RelativeLayout>
The percent = 80
parameter defines the percentage of initial content visible before the wall appears. Of course, you can fine-tune this behavior with other options available in the documentation.
Thank you for reading. If you encounter any issues accessing the content or have questions, feel free to contact our support team.
See you soon!