Skip to content

Expose launch and launchIfNeeded to Java#2695

Merged
vegaro merged 3 commits intomainfrom
unity
Sep 30, 2025
Merged

Expose launch and launchIfNeeded to Java#2695
vegaro merged 3 commits intomainfrom
unity

Conversation

@vegaro
Copy link
Copy Markdown
Member

@vegaro vegaro commented Sep 30, 2025

@vegaro vegaro added pr:fix A bug fix pr:RevenueCatUI pr:feat A new feature and removed pr:fix A bug fix labels Sep 30, 2025
@JvmOverloads
fun launch(
offeringIdentifier: String,
offeringIdentifier: String?,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is required to be able to call launch without an offering identifier. I can't use the launch that accepts an Offering because I need the presentedOfferingContext as parameter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm I think presentedOfferingContext should always be null if the offering identifier/offering is null right? If so, I think we should be able to use that one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh, ok, so if offering and presentedOfferingContext are null, call the one with Offering. Otherwise this one. Good to know!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I need to pick your brain:

  • If I remove ? and keep the @JvmOverloads, there are two conflicting APIs in Java since launcher.launch(null, null) could be launch(Offering,ParcelizableFontProvider) and launch(String,PresentedOfferingContext)
  • If I don't use @JvmOverloads I can't use the defaults in the optional parameters in launch and launchIfNeeded

Any ideas besides creating new calls? Or migrating this to Kotlin lol

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh I know what to do! @JvmName("launchWithOfferingId")

Copy link
Copy Markdown
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

I think we don't need to make the parameter nullable and can just rely on the launch method that takes a nullable offering? Other than that, this looks good!

@vegaro vegaro enabled auto-merge September 30, 2025 14:54
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.95%. Comparing base (d5747a1) to head (a9bdbc0).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2695   +/-   ##
=======================================
  Coverage   77.95%   77.95%           
=======================================
  Files         309      309           
  Lines       11595    11595           
  Branches     1597     1597           
=======================================
  Hits         9039     9039           
  Misses       1859     1859           
  Partials      697      697           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vegaro vegaro added this pull request to the merge queue Sep 30, 2025
Merged via the queue into main with commit 656542a Sep 30, 2025
21 checks passed
@vegaro vegaro deleted the unity branch September 30, 2025 15:26
github-merge-queue bot pushed a commit that referenced this pull request Oct 1, 2025
**This is an automatic release.**

> [!WARNING]  
> If you don't have any login system in your app, please make sure your
one-time purchase products have been correctly configured in the
RevenueCat dashboard as either consumable or non-consumable. If they're
incorrectly configured as consumables, RevenueCat will consume these
purchases. This means that users won't be able to restore them from
version 9.0.0 onward.
> Non-consumables are products that are meant to be bought only once,
for example, lifetime subscriptions.


## RevenueCat SDK
### ✨ New Features
* Add Airbridge device ID subscriber attribute (#2696) via Lim Hoang
(@limdauto)
* Enable Test Store (#2685) via Antonio Pallares (@ajpallares)

## RevenueCatUI SDK
### ✨ New Features
* Expose `launch` and `launchIfNeeded` to Java (#2695) via Cesar de la
Vega (@vegaro)
### Customer Center
#### 🐞 Bugfixes
* Fix Expired badge in Customer Center dark mode (#2693) via Cesar de la
Vega (@vegaro)

### 🔄 Other Changes
* Add CODEOWNERS (#2664) via Facundo Menzella (@facumenzella)
* Adds new tab ID properties to `TabsComponent`. (#2577) via JayShortway
(@JayShortway)
* Bump fastlane-plugin-revenuecat_internal from `401d148` to `7508f17`
(#2697) via dependabot[bot] (@dependabot[bot])
* Reimplement placeholder with Modifier.Node (#2677) via Jaewoong Eum
(@skydoves)
* Remove unused kotlinCompilerExtensionVersion (#2691) via Jaewoong Eum
(@skydoves)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2667) via RevenueCat Git Bot (@RCGitBot)

Co-authored-by: revenuecat-ops <[email protected]>
vegaro added a commit that referenced this pull request Oct 15, 2025
This was referenced Oct 15, 2025
vegaro added a commit that referenced this pull request Oct 15, 2025
vegaro added a commit that referenced this pull request Oct 15, 2025
@vegaro vegaro mentioned this pull request Oct 15, 2025
vegaro added a commit that referenced this pull request Oct 15, 2025
vegaro added a commit that referenced this pull request Oct 15, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 16, 2025
## RevenueCat SDK
> [!NOTE]  
> This release brings all non-breaking changes between SDK versions
9.6.0 and 9.11.0 to major 8, so developers that don't/can't use major 9,
can still get the latest updates. meant to be bought only once, for
example, lifetime subscriptions.

### ✨ New Features
* Adds new experimental `storefrontLocale` APIs. (#2726) via JayShortway
(@JayShortway)
* Turn on Video Component (#2725) via Jacob Rakidzich (@JZDesign)
* Add support for the Test Store (#2710) via Toni Rico (@tonidero)
* Add Airbridge device ID subscriber attribute (#2696) via Lim Hoang
(@limdauto)
* Enable Test Store (#2685) via Antonio Pallares (@ajpallares)
### 🐞 Bugfixes
* Fix deadlock in `allowSharingPlayStoreAccount` (#2707) via Cesar de la
Vega (@vegaro)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* Expose `launch` and `launchIfNeeded` to Java (#2695) via Cesar de la
Vega (@vegaro)
#### 🐞 Bugfixes
* Fix bundled font families when using assets folder (#2672) via Toni
Rico (@tonidero)
### Customer Center
#### ✨ New Features
* Add Customer Center per-view listener for hybrids (#2713) via Facundo
Menzella (@facumenzella)
* Display Virtual Currencies in Customer Center (#2652) via Will Taylor
(@fire-at-will)
#### 🐞 Bugfixes
* Fixes more Icons crashing with `NoClassDefFoundError` when using
Material 1.4.0 (#2732) via Cesar de la Vega (@vegaro)
* Fix potential `NoClassDefFoundError` crash finding `Icons` caused by
material3 1.4.0 (#2727) via Cesar de la Vega (@vegaro)
* Fix Expired badge in Customer Center dark mode (#2693) via Cesar de la
Vega (@vegaro)
* Fix promo offer button CTA in Customer Center (#2682) via Cesar de la
Vega (@vegaro)

### 🔄 Other Changes
* Add test store maestro test (#2711) via Toni Rico (@tonidero)
* Finalize video component to include a checksum, and optimize memory
usage for large file downloads (#2717) via Jacob Rakidzich (@JZDesign)
* Add `TestStoreSimulatedPurchaseError` error code (#2716) via Toni Rico
(@tonidero)
* Bump fastlane-plugin-revenuecat_internal from `3f7fffc` to `25c7fb8`
(#2721) via dependabot[bot] (@dependabot[bot])
* Disable offline entitlements in test store (#2718) via Toni Rico
(@tonidero)
* Add E2E Test app for integration tests (#2715) via Toni Rico
(@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2714) via RevenueCat Git Bot (@RCGitBot)
* Bump fastlane-plugin-revenuecat_internal from `a8770fd` to `3f7fffc`
(#2712) via dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `e555afb` to `a8770fd`
(#2708) via dependabot[bot] (@dependabot[bot])
* Correct Opt In for FileRepository (#2709) via Jacob Rakidzich
(@JZDesign)
* Paywalls -> Video Component (#2680) via Jacob Rakidzich (@JZDesign)
* Update fastlane-plugin-revenuecat_internal to e555afb (#2705) via
Cesar de la Vega (@vegaro)
* [EXTERNAL] Fix incorrect exception use in test (#2674) via @nikit19
(#2703) via Toni Rico (@tonidero)
* Add CODEOWNERS (#2664) via Facundo Menzella (@facumenzella)
* Adds new tab ID properties to `TabsComponent`. (#2577) via JayShortway
(@JayShortway)
* Bump fastlane-plugin-revenuecat_internal from `401d148` to `7508f17`
(#2697) via dependabot[bot] (@dependabot[bot])
* Reimplement placeholder with Modifier.Node (#2677) via Jaewoong Eum
(@skydoves)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2667) via RevenueCat Git Bot (@RCGitBot)
* Bump fastlane-plugin-revenuecat_internal from `a6dc551` to `401d148`
(#2683) via dependabot[bot] (@dependabot[bot])
* Bump rexml from 3.4.1 to 3.4.2 (#2676) via dependabot[bot]
(@dependabot[bot])
* Add 8.24.0 CHANGELOG to main (#2662) via Toni Rico (@tonidero)
* Bump fastlane-plugin-revenuecat_internal from `489faef` to `a6dc551`
(#2673) via dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `7d97553` to `489faef`
(#2671) via dependabot[bot] (@dependabot[bot])
* File Repository (#2634) via Jacob Rakidzich (@JZDesign)

Co-authored-by: revenuecat-ops <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants