Skip to content

Support PaywallActivity screenOrientation manifest override#844

Merged
tonidero merged 1 commit into
mainfrom
feat/paywall-orientation-override
Mar 11, 2026
Merged

Support PaywallActivity screenOrientation manifest override#844
tonidero merged 1 commit into
mainfrom
feat/paywall-orientation-override

Conversation

@tonidero

@tonidero tonidero commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • With the changes to use a view instead of the PaywallActivity in refactor: Use PaywallView instead of PaywallActivity on Android #841, we broke a situation that some devs used to override the activity orientation to present their paywall. This PR fixes that breaking behavior change.
  • Reads android:screenOrientation from the PaywallActivity manifest entry (which users may override via manifest merging) and applies it using Unity's Screen.orientation API before presenting the paywall
  • Restores the original orientation when the paywall is dismissed
  • Preserves backward compatibility for users who set screenOrientation on PaywallActivity now that the paywall uses a Dialog instead of a separate Activity

Test plan

  • Override PaywallActivity screenOrientation to landscape in app manifest and verify paywall displays in landscape
  • Verify orientation restores to original after paywall is dismissed
  • Verify no orientation change when no manifest override is present
  • Test with both portrait and landscape overrides

🤖 Generated with Claude Code

@tonidero tonidero added pr:other Changes to our CI configuration files and scripts pr:fix A bug fix and removed pr:fix A bug fix labels Mar 4, 2026
@tonidero tonidero marked this pull request as ready for review March 4, 2026 12:10
@tonidero tonidero requested a review from a team as a code owner March 4, 2026 12:10
@tonidero tonidero requested review from a team, facumenzella and vegaro March 4, 2026 12:11
// android.content.pm.ActivityInfo.SCREEN_ORIENTATION_* constants
switch (androidOrientation)
{
case 0: // SCREEN_ORIENTATION_LANDSCAPE

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base automatically changed from feat/purchase-logic-paywall to main March 11, 2026 11:47
…h Dialog approach

Read android:screenOrientation from the PaywallActivity manifest entry
(which users may override via manifest merging) and apply it using
Unity's Screen.orientation API before presenting the paywall. The
original orientation is restored when the paywall is dismissed.

This preserves backward compatibility for users who set
screenOrientation on PaywallActivity now that the paywall uses a
Dialog instead of a separate Activity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonidero tonidero force-pushed the feat/paywall-orientation-override branch from 892404d to 71ed180 Compare March 11, 2026 12:42
@tonidero tonidero enabled auto-merge (squash) March 11, 2026 12:42
@tonidero tonidero merged commit 383ac8d into main Mar 11, 2026
8 checks passed
@tonidero tonidero deleted the feat/paywall-orientation-override branch March 11, 2026 12:59
ajpallares pushed a commit that referenced this pull request Mar 11, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add PurchaseLogic support for paywall presentation when
`PurchasesAreCompletedBy.MyApp` (#842) via Toni Rico (@tonidero)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.46.1 (#854) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.23.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.1)
* [Android
9.23.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.0)
* [iOS
5.61.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.61.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.46.0 (#853) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.23.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.1)
* [Android
9.23.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.0)
* [iOS
5.61.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.61.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.44.0 (#850) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.23.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.1)
* [Android
9.23.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.23.0)
* [iOS
5.61.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.61.0)

## RevenueCatUI SDK
### ✨ New Features
* Add full screen paywall presentation support (#839) via Cesar de la
Vega (@vegaro)

### 🔄 Other Changes
* Redo Subtester app and fix Android emulators support (#855) via Cesar
de la Vega (@vegaro)
* Support PaywallActivity screenOrientation manifest override (#844) via
Toni Rico (@tonidero)
* refactor: Use PaywallView instead of PaywallActivity on Android (#841)
via Toni Rico (@tonidero)
* Add API tests for Paywalls and CustomerCenter presenters (#735) via
Facundo Menzella (@facumenzella)
* Bump fastlane-plugin-revenuecat_internal from `f5c099b` to `e146447`
(#852) via dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `8cd957f` to `f5c099b`
(#848) via dependabot[bot] (@dependabot[bot])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other Changes to our CI configuration files and scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants