Skip to content

Add PaywallOptions.HideAndroidSystemBars to run paywalls immersive on Android - #10

Open
bilck wants to merge 1 commit into
superwall:mainfrom
bilck:feat/paywall-hide-android-system-bars
Open

bilck wants to merge 1 commit into
superwall:mainfrom
bilck:feat/paywall-hide-android-system-bars

Conversation

@bilck

@bilck bilck commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

The paywall is the SDK's own Activity, so a host app that runs full-screen (immersive) gets the status and
navigation bars back the moment a paywall opens. superwall-android's edge-to-edge handling then pads only the
bottom system-bar inset; in landscape the 3-button navigation bar sits on a side and covers paywall content.

Change

A new bridge-level option, PaywallOptions.HideAndroidSystemBars (default false, ignored on iOS). When
true, the Android bridge registers ActivityLifecycleCallbacks once at configure and, whenever
SuperwallPaywallActivity is created or resumed, hides the system bars with the sticky-immersive behaviour
(a swipe from the edge shows them transiently). The activity is matched by class name so an upstream rename
degrades to a no-op. No native SDK change is required.

Verification

Moto G24 Power (Android, 3-button navigation), landscape app: with the option on, the paywall opens without
bars and content is no longer covered on the side. Off, behaviour is unchanged.

Open question for maintainers: the side-inset padding in landscape looks like a superwall-android issue
independent of this option; happy to file it separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LTHPGB4qyAwDVYmQHW87ex

… Android

The paywall is the SDK's own Activity, so a host app that runs full-screen
(immersive) gets the status and navigation bars back the moment a paywall
opens. superwall-android's edge-to-edge handling then pads only the bottom
system-bar inset; in landscape the 3-button navigation bar sits on a side and
covers paywall content there.

The new option is bridge-level (no native counterpart): when true, the Android
bridge registers ActivityLifecycleCallbacks once at configure and, whenever
SuperwallPaywallActivity is created or resumed, hides the system bars with the
sticky-immersive behaviour (a swipe from the edge shows them transiently). The
activity is matched by class name so an upstream rename degrades to a no-op.
Default false; ignored on iOS.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant