Skip to content

6.3.0

Latest

Choose a tag to compare

@kherembourg kherembourg released this 19 Nov 15:21

6.3.0

Added

  • Subscription status listener. Register a listener with Purchasely.addUserSubscriptionStatusListener(listener) and remove it with Purchasely.removeUserSubscriptionStatusListener(listener). Each call gives isActive: true when the user has one or more active subscriptions. A change call gives the reason (PURCHASED, RESTORED, EXPIRED or WEB_REDEEMED). A status call has no reason. The SDK calls the listeners on the main thread. Purchasely.userSubscriptionStatusFlow() gives the same calls as a Kotlin Flow.
  • ply/restore deeplink. It restores the purchases of the user, as the Restore button of a paywall does. It works in Full mode only.
  • Campaigns experiments. The new SDK events EXPERIMENT_ASSIGNED and EXPERIMENT_EXPOSED reach your EventListener. The SDK sends the new built-in attributes ply_experiments and ply_holdout. When an inline view of a DEACTIVATED presentation would have shown, call PLYPresentation.exposed() once.
  • Privacy purpose PLYDataProcessingPurpose.SupportInvestigation. PLYDataProcessingPurpose.AllNonEssentials includes it. To send a refusal that an older SDK version stored, call revokeDataProcessingConsent(setOf(AllNonEssentials)) again.
  • "Ignore device text size" screen setting. A screen with this Console setting keeps its text size when the user selects a large system font.
  • Google Play Billing Library 9.1.0. The SDK now uses Google Play Billing Library 9.1.0, and Gradle resolves your app to it. If your app calls the Billing Library, do not use the APIs that Billing 9 removes (SkuDetails, SkuDetailsParams, BillingClient.SkuType, QueryPurchaseHistoryParams). See the Billing 9 migration guide.

Changed

  • Source compatibility: PLYEvent, PLYDeepLink and PLYDataProcessingPurpose have new subclasses. If your code uses an exhaustive when on one of these types without an else branch, add the branch.
  • Source compatibility: PLYTransition.backgroundColors?.color() is removed. Read backgroundColors?.light or backgroundColors?.dark and select the value for the theme of your app.
  • The SDK starts only when a screen of your app is open. A start in the background (a push or a job) waits for the next screen. A user attribute or a dynamic offering that you set while the start waits for a screen is dropped: set it again after start() succeeds. APP_STARTED is sent only after a successful start, so the count of app sessions decreases.
  • The navigate action of a paywall opens http and https links in the web view, and other links with their app. It blocks javascript, file, content, intent and data links.
  • The alert for a Google Play ERROR shows the message and the code of Google. On a device that blocks the Play Store, a purchase fails with PLYError.BillingUnavailable.
  • Each event now includes the integration IDs that you set with Purchasely.setAttribute, also the email attributes. The SDK removes them when the user refuses the third-party integrations purpose.
  • The Google Play obfuscatedProfileId of a purchase now holds a purchase context token, not a hash of the user ID.
  • The R8 rules of the SDK keep only the code that the SDK reaches by name, so your minified app is smaller. If your code reaches SDK classes by reflection, or uses Lottie directly, add your own keep rules. Your own player class named with Purchasely.playerView no longer needs a keep rule.

Deprecated

  • Purchasely.purchaseListener, PurchaseListener and Purchasely.livePurchase(). Use Purchasely.addUserSubscriptionStatusListener(). They will be removed in 7.0.

Fixed

  • After a Google Play error during a purchase, the SDK recovers a paid purchase that the backend does not know.
  • restoreAllProducts() and silentRestoreAllProducts() call onError with PLYError.BillingUnavailable when Google Play Billing is not available.
  • A Google Play purchase that was pending is validated once at start, not twice.
  • When the first import of the Google Play purchases fails, the SDK tries again at the next start.
  • A restore or a synchronization works after your callback threw an exception.
  • A Huawei or Amazon restore now ends and calls its callback.
  • A paywall action that starts when no paywall is on screen fails at once and no longer blocks the next paywalls.
  • After a rotation, the buttons of the web checkout dialog work again.
  • A flow keeps its current step after a rotation, a fold, a split screen or a window resize, and its next action works.
  • A flow that Android restores after the process ended shows its steps again, with no "Network connection failed" alert.
  • A percent width in a horizontal stack now has the same size as on iOS and in the Console. Percent widths in vertical stacks and ZStacks are also correct when the layout changes size.
  • Prices show the trailing zero of the cents (18,90 €, not 18,9 €).
  • The status bar icons over a paywall follow the light or dark theme of the paywall.
  • On Android TV, the link screen uses the language of the paywall.
  • The SDK sends each event once.
  • The events that an older SDK version stored keep their user and device fields after the update.
  • An event keeps the user attributes of the moment it fired, also when your EventListener changes them.
  • A network failure inside a TLS connection no longer crashes the app. The request fails as a network error.
  • A logout no longer loses the subscriptions of the anonymous user.
  • A process kill during a save no longer erases the saved user data.
  • A pending purchase is no longer lost from the retry list, and one device keeps one device ID.
  • The SDK does less work on the main thread at start and when a paywall draws.
  • A paywall opened while the products load no longer starts a second load.
  • In the minified app of an app without the player module, the period texts (month, 1 month) are no longer empty.