Miniwall Docs
Mobile SDK

Android

Platform guide for the Miniwall Android SDK, covering requirements, Play Billing, Compose, Views and lifecycle.

The Android SDK is the library com.miniwall:sdk. It draws screens with Jetpack Compose and needs Android 7.0 (API 24) or later. Installation shows how to add it and call configure.

Everything in the other Mobile SDK pages applies. This page collects what is specific to Android.

Calls at a glance

WhatCall
Set upMiniwall.configure(context, apiKey, options) in Application.onCreate
Show a screenMiniwall.present(activity, source, options) (suspend), or with a callback for Java
Embed a screenMiniwallScreen(source, options, modifier, onFinish) (composable)
Load aheadMiniwall.preload(placements) (suspend)
Auto placementsMiniwall.startAutoPlacements(onResult, options), Miniwall.track(event)
AttributesMiniwall.setAttributes(map)
After an outside purchaseMiniwall.reportPurchase(packageId, paywallId)
Forget the userMiniwall.reset(placements)
Package IDs of a screenMiniwall.packageIds(paywallJson)

present needs a live Activity. Call it from a coroutine, for example lifecycleScope.launch. If the coroutine is cancelled, the screen closes.

Display

Popups, slide-ins and full-screen covers open in MiniwallActivity, a translucent activity the library declares in its manifest. Banners and toasts are added over your activity's content. See Display modes. The system back button closes an open sheet inside the screen first, then the screen.

Play Billing

The SDK does not depend on Play Billing. Map your ProductDetails to ProductInfo and run the billing flow in onPurchase. See Purchases and prices.

Views and Java

MiniwallScreen is a composable. In a View-based app, host it in a ComposeView. Miniwall.present(activity, source, options) { result -> ... } takes a callback and works from Java.

Auto placements and the lifecycle

Auto placements follow your activities: an open is counted when the first activity starts after the app was in the background. The screen is presented over the activity that is resumed at that moment. See Auto placements.

On this page