Skip to content

Add an option to hide system bars on Android paywalls - #14

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

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

Conversation

@bilck

@bilck bilck commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Problem

A paywall is presented in its own SuperwallPaywallActivity, so a host application that uses immersive full-screen mode gets the status and navigation bars back when the paywall opens. In landscape with 3-button navigation, the side navigation bar can cover paywall content.

Change

Add PaywallOptions.HideAndroidSystemBars, defaulting to false and ignored on iOS. When enabled, the Android bridge registers activity lifecycle callbacks once at configuration and applies sticky immersive system-bar behavior whenever SuperwallPaywallActivity is created or resumed. Matching by class name makes a future SDK rename degrade to a no-op rather than a compile failure.

Verification

  • Android bridge assembleRelease succeeds with AGP 9.0.1 and compile SDK 36.
  • Verified on a landscape Android device using 3-button navigation: paywall content is no longer covered.
  • Default behavior is unchanged when the option is disabled.
  • No iOS code changes.

… 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>
@bilck

bilck commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Withdrawing this one — #15 solved the underlying problem better.

The reason for an immersive option was that a full-screen Android paywall activity covered the Unity view and
the system bars drew over the paywall's own layout. Now that paywalls present in-window by default, the Unity
view keeps rendering behind them and PaywallOptions.AndroidPresentation = AndroidPaywallPresentation.InWindow
covers the case this PR was trying to address, without a new option or any window-flag handling.

Closing in favour of that. Thanks for picking up the in-window work.

@bilck bilck closed this Oct 27, 2026
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