Fix runtime crash when using amazon and targetting android 14#1622
Merged
Conversation
tonidero
commented
Feb 21, 2024
| appcompat = "1.4.1" | ||
| dokka = "1.8.10" | ||
| androidxCore = "1.8.0" | ||
| androidxCore = "1.12.0" |
Contributor
Author
There was a problem hiding this comment.
Didn't see anything concerning in these and allows us to use the new ContextCompat.registerReceiver
| internal var broadcastReceiver: ProxyAmazonBillingActivityBroadcastReceiver? = null | ||
| private val filter = ProxyAmazonBillingActivityBroadcastReceiver.newPurchaseFinishedIntentFilter() | ||
|
|
||
| @SuppressLint("WrongConstant") |
Contributor
Author
There was a problem hiding this comment.
This was very weird... The linter was complaining that we were passing the wrong type when passing ContextCompat.RECEIVER_EXPORTED even though it's the expected type...
| } | ||
|
|
||
| @VisibleForTesting(otherwise = PRIVATE) | ||
| @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) |
Contributor
Author
There was a problem hiding this comment.
This broke compilation after the update for some reason... In any case, this is how we do it everywhere else.
vegaro
approved these changes
Feb 21, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1622 +/- ##
=======================================
Coverage 83.67% 83.67%
=======================================
Files 219 219
Lines 7343 7343
Branches 1023 1023
=======================================
Hits 6144 6144
Misses 799 799
Partials 400 400 ☔ View full report in Codecov by Sentry. |
tonidero
pushed a commit
that referenced
this pull request
Feb 22, 2024
**This is an automatic release.** ### New Features * Add setDisplayDismissButton to PaywallView (#1608) via Cesar de la Vega (@vegaro) ### Bugfixes * Fix runtime crash when using amazon and targetting android 14 (#1622) via Toni Rico (@tonidero) * Paywalls: No-op on all view model methods in the Loading paywall screen (#1617) via Toni Rico (@tonidero) * Fix safe insets on full screen (#1613) via Cesar de la Vega (@vegaro) ### Other Changes * Change default paywall background with a lower quality image (#1623) via Toni Rico (@tonidero) * Fix load shedder integration tests (#1618) via Cesar de la Vega (@vegaro) * Refactor `presentedOfferingIdentifier` into `presentedOfferingContext` object (#1612) via Toni Rico (@tonidero) * [External] Update russian and kazakh translations (#1577 by @janbolat) (#1616) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero
added a commit
that referenced
this pull request
Mar 13, 2024
### Description In #1622, we updated to androidx core 1.12.0 which increased the target version to 34. This however, brought some problems in some of the hybrids: RevenueCat/purchases-capacitor#211. This update was to access some optional method that we can easily implement ourselves, so we are reverting that update and implementing the fallback for registering the receiver ourselves. We will add additional checks to avoid inadvertently upgrading the target version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As reported in #1621, the app crashed when using amazon and targetting android 14 in an android 14 device and starting a purchase. This fixes the issue.