MsbSvg.RevenueCat.Maui.Android.PaywallUI
9.2.0.28
dotnet add package MsbSvg.RevenueCat.Maui.Android.PaywallUI --version 9.2.0.28
NuGet\Install-Package MsbSvg.RevenueCat.Maui.Android.PaywallUI -Version 9.2.0.28
<PackageReference Include="MsbSvg.RevenueCat.Maui.Android.PaywallUI" Version="9.2.0.28" />
<PackageVersion Include="MsbSvg.RevenueCat.Maui.Android.PaywallUI" Version="9.2.0.28" />
<PackageReference Include="MsbSvg.RevenueCat.Maui.Android.PaywallUI" />
paket add MsbSvg.RevenueCat.Maui.Android.PaywallUI --version 9.2.0.28
#r "nuget: MsbSvg.RevenueCat.Maui.Android.PaywallUI, 9.2.0.28"
#:package MsbSvg.RevenueCat.Maui.Android.PaywallUI@9.2.0.28
#addin nuget:?package=MsbSvg.RevenueCat.Maui.Android.PaywallUI&version=9.2.0.28
#tool nuget:?package=MsbSvg.RevenueCat.Maui.Android.PaywallUI&version=9.2.0.28
MsbSvg.RevenueCat.Maui.Android.PaywallUI
RevenueCat Android Paywall UI bindings for .NET MAUI.
Display RevenueCat's native Paywall UI — including V2 component-based paywalls designed in the RevenueCat Dashboard — on Android in your .NET MAUI app.
No official MAUI binding exists for the RevenueCat Paywall UI layer. This package fills that gap with a production-ready solution.
Why This Package?
RevenueCat's purchases-ui for Android is built entirely with Jetpack Compose. Creating traditional C# bindings for 30+ Compose libraries is impractical. This package takes a smarter approach:
| Layer | What It Does |
|---|---|
| Java Bridge AAR | Wraps PaywallActivity launch — no Compose binding needed on the C# side |
purchases-ui-9.2.0.aar |
RevenueCat's official Paywall UI library |
| ~33 native AAR/JAR files | All required Jetpack Compose, Material 3, Coil, and other transitive dependencies |
| C# Wrapper | Clean RevenueCatPaywallUI static API — configure once, show paywall with one line |
The core RevenueCat SDK (purchases) and its C# bindings are not included — they come from the required Kebechet.Maui.RevenueCat.Android dependency. This separation prevents duplicate class conflicts and keeps each package focused on its responsibility.
Prerequisites
Your MAUI project must have the RevenueCat core Android SDK installed:
Kebechet.Maui.RevenueCat.Android(9.2.0.2+)
This package is automatically pulled as a dependency, but it's good practice to reference it explicitly so you have access to the full C# API (CustomerInfo, Purchases, etc.).
Installation
dotnet add package Kebechet.Maui.RevenueCat.Android # Core SDK + C# bindings
dotnet add package MsbSvg.RevenueCat.Maui.Android.PaywallUI # Paywall UI (this package)
That's it. The bundled .targets file automatically injects the native AAR/JAR files into your Android build. No manual configuration needed.
Quick Start
1. Configure the SDK — Platforms/Android/MainApplication.cs
using MsbSvg.RevenueCat.Maui.Android.PaywallUI;
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership) { }
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
public override void OnCreate()
{
base.OnCreate();
RevenueCatPaywallUI.Configure(this, "your_google_api_key");
}
}
2. Show the Paywall
private void OnShowPaywallClicked(object sender, EventArgs e)
{
#if ANDROID
var activity = Platform.CurrentActivity;
if (activity != null)
{
RevenueCatPaywallUI.ShowPaywall(activity);
}
#endif
}
3. Show a Specific Offering
RevenueCatPaywallUI.ShowPaywall(activity, offeringId: "premium_offering");
4. One-Shot: Configure + Show
RevenueCatPaywallUI.ConfigureAndShowPaywall(activity, "your_google_api_key");
Paywall Presentation Modes
RevenueCat Dashboard offers three presentation styles. Here's how they behave on each platform:
| Dashboard Setting | iOS Behavior | Android Behavior |
|---|---|---|
| Full Screen | Full-screen modal | Full-screen Activity ✅ |
| Sheet | Bottom sheet modal | Full-screen Activity (Android convention) |
| Navigation Push | Pushed onto nav stack | Full-screen Activity (back stack) ✅ |
On Android, PaywallActivity always launches as a full-screen Activity — this is the standard Android platform convention. The user can dismiss it by pressing the back button or the close button within the paywall. All three dashboard modes produce the same behavior on Android.
API Reference
| Method | Description |
|---|---|
RevenueCatPaywallUI.Configure(context, apiKey) |
Initialize the RevenueCat SDK. Call once at app startup. |
RevenueCatPaywallUI.IsConfigured |
Returns true if the SDK is already configured. |
RevenueCatPaywallUI.ShowPaywall(activity) |
Launch the paywall for the default offering. |
RevenueCatPaywallUI.ShowPaywall(activity, offeringId) |
Launch the paywall for a specific offering. |
RevenueCatPaywallUI.ConfigureAndShowPaywall(activity, apiKey) |
Configure + launch in a single call. |
How It Works
Your MAUI C# Code
→ RevenueCatPaywallUI.ShowPaywall(activity)
→ JNI → RevenueCatPaywallBridge.java (bundled AAR)
→ PaywallContract.createIntent()
→ PaywallActivity (Jetpack Compose — full screen)
→ Native V1 / V2 paywall rendering
The bridge uses PaywallContract.createIntent() to construct the Intent and launches PaywallActivity as a standard Android Activity. Jetpack Compose handles all rendering inside PaywallActivity — your MAUI code never touches Compose directly.
Compatibility
| Requirement | Version |
|---|---|
| .NET | 9.0+ / 10.0+ |
| Android min SDK | API 24 (Android 7.0) |
| RevenueCat SDK | purchases:9.2.0 / purchases-ui:9.2.0 |
| Paywall types | V1 (template-based) ✅ · V2 (component-based) ✅ |
Troubleshooting
"Displaying default template due to validation errors"
This is a RevenueCat Dashboard configuration issue, not a code problem:
- Ensure all localization keys have values for every configured language
- Known RevenueCat dashboard bug: Missing string localization for locale en_US
- Fix: Remove extra languages from the paywall in the dashboard, save, re-add them, then fill in all strings
AAPT2 / Stamp File Errors
Clean the build artifacts and rebuild:
dotnet clean
rm -rf obj/ bin/
dotnet build
ClassNotFoundException at Runtime
Make sure both packages are installed:
Kebechet.Maui.RevenueCat.Android— core SDK with C# bindingsMsbSvg.RevenueCat.Maui.Android.PaywallUI— Paywall UI (this package)
If you see ClassNotFoundException for Compose/AndroidX classes, ensure your build is not stripping native AAR files.
D8 Duplicate Class Errors
If another package in your project provides the same native library (e.g., OkHttp, Play Services), you may see duplicate class errors. This package is designed to work alongside Kebechet.Maui.RevenueCat.Android without conflicts. If you're using additional packages that bundle the same native libraries, you may need to exclude the conflicting dependency from one side.
Package Architecture
MsbSvg.RevenueCat.Maui.Android.PaywallUI (this package)
├── Paywall UI (purchases-ui-9.2.0.aar)
├── Jetpack Compose Runtime, UI, Foundation, Animation
├── Material 3
├── Coil (image loading for paywall assets)
├── Compose integrations (activity-compose, lifecycle-compose, etc.)
├── Java Bridge (RevenueCatBridge-release.aar)
└── C# wrapper (RevenueCatPaywallUI.cs)
Kebechet.Maui.RevenueCat.Android (required dependency)
├── Core RevenueCat SDK (purchases-9.2.0.aar)
├── Google Play Billing
├── Play Services
├── OkHttp / OkIO
├── Kotlin Serialization
└── Full C# bindings (CustomerInfo, Purchases, etc.)
🐾 A Small Note
If this package saved you time and you'd like to say thanks — please feed a stray animal 🐶🐱
No donations needed. Just a small act of kindness for a friend on the street.
Author
Musab Sevgi
- NuGet: nuget.org/profiles/musabsevgi
- GitHub: github.com/msbsvg
License
MIT — see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. |
-
net10.0-android36.0
- Kebechet.Maui.RevenueCat.Android (>= 9.2.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v9.2.0.28: Stable production release. Lean UI-only package — all core SDK dependencies (OkHttp, OkIO, Billing, Play Services, Kotlin Serialization) come from Kebechet.Maui.RevenueCat.Android. Supports V1 template and V2 component-based paywalls.