Skip to content

6.0.0-rc.1

Choose a tag to compare

@chouaibMo chouaibMo released this 12 Jun 17:52
· 6 commits to master since this release

Warning

v6 is currently in a release-candidate phase — use 6.0.0-rc.1, not 6.0.0. 6.0.0-rc.1 is the official build to integrate against for early integration and testing while v6 stabilizes. Use it to validate your migration and report any issues; the stable 6.0.0 will be announced once the RC cycle completes.

implementation("io.purchasely:core:6.0.0-rc.1")
implementation("io.purchasely:google-play:6.0.0-rc.1")
// implementation("io.purchasely:player:6.0.0-rc.1") // optional

Purchasely Android SDK 6.0.0-rc.1

The first release candidate of the v6 major version. v6 modernizes the presentation API, reworks the action interceptor, makes storeless and observer-first the defaults, and tightens initialization. This is a major release with breaking changes — read the full migration guide before upgrading.

✨ Highlights & New Features

  • New PLYPresentation API — a complete builder / preload / display lifecycle with an observable state: StateFlow<PLYPresentationState> (Idle → Loading → Loaded → Displayed → Dismissed/Error). Preload early, display later, no extra network call.
  • PLYPresentationSession — every display(...) returns a session handle. Fire-and-forget from Java, or await() it from a coroutine to suspend until dismissal and get a PLYPresentationOutcome (structured concurrency + try/catch).
  • Granular action interceptorinterceptAction<PLYPresentationAction.Purchase> { … } replaces the monolithic setPaywallActionsInterceptor. Type-safe parameters per action, no casting.
  • Kotlin DSL entrypointPurchasely { context(...); apiKey(...); … } configures and starts in one block, with editor-time Lint checks (PurchaselyMissingContext, PurchaselyMissingApiKey, PurchaselyFullModeWithoutStores).
  • Storeless integration is now first-class — screens, analytics, campaigns, deeplinks, and user attributes all work with no store configured.
  • Automatic deeplink interception — the SDK reads the foreground activity's intent and routes its own URIs. No handleDeeplink() call required (opt out via automaticDeeplinkHandling).
  • Independent campaign gating — new allowCampaigns flag decouples campaign display from deeplink handling.
  • synchronize() completion callbackssynchronize(onSuccess, onError) for Observer mode; the subscriptions cache is refreshed before onSuccess fires.
  • Structured transition dimensionsPLYTransition supports px (dp) and percentage for drawer/popin height and popin width.
  • Logging — custom loggers now receive all messages regardless of logLevel; new logcatEnabled flag controls Logcat independently.

⚠️ Breaking Changes

Initialization & running mode

  • Default running mode is now Observer (was Full). Add .runningMode(PLYRunningMode.Full) if you want Purchasely to handle/validate purchases. In Observer mode, presentations no longer auto-close after purchase/restore.
  • PLYRunningMode.PaywallObserverPLYRunningMode.Observer (rename).
  • apiKey is validated at start() — null/blank leaves the SDK inert and fires PLYError.Configuration.
  • Init callback signature simplifiedstart { error -> } (dropped the leading Boolean). Java: Function2<Boolean,PLYError,Unit>Function1<PLYError,Unit>.

Action interceptor

  • Removed setPaywallActionsInterceptor(), PLYPresentationInfo, PLYPaywallActionHandler/PLYCompletionHandler, PLYPaywallActionListener/PLYProcessActionListener.
  • PLYPresentationAction is now a sealed class (was enum); PLYPresentationActionParameters removed (params live on each subclass).
  • processAction(false/true)PLYInterceptResult.SUCCESS / NOT_HANDLED (+ new FAILED).
  • Kotlin reified interceptAction<T> requires consumer jvmTarget = 11 (or use the Class-based overload).

Presentation API

  • All presentation types moved to io.purchasely.ext.presentation.* (import-only change).
  • PLYPresentationProperties removed — configure via the builder/DSL.
  • Purchasely.presentationView(...) removedPLYPresentation { … }.preload { … }.
  • PLYPresentation.idscreenId (also toMap() key "id""screenId").
  • Suspend display() extension removedLoaded.display() is now non-suspend.
  • onCloseonCloseRequested; PLYPresentationClosePLYPresentationCloseRequested.
  • Display callbacks now receive a single PLYPresentationOutcome (carries purchaseResult, plan, closeReason, error) instead of (result, plan) + separate error.
  • back()/close() are now on PLYPresentation (Loaded) only.
  • PLYProductViewResult deprecatedPLYPurchaseResult.

Removed surfaces

  • Subscription list & cancellation survey UI fully removed — subscriptionsFragment(), all PLYSubscription*/cancellation fragments & views, the ply/subscriptions & ply/cancellation_survey deeplinks, and 5 related PLYEvent subclasses. Build custom UI from userSubscriptions() / userSubscriptionsHistory().
  • Purchase historypurchaseHistory() and isPastSubscriber() removed → userSubscriptionsHistory().
  • PLYPlan intro* methods removedoffer* equivalents (direct rename).
  • PLYPlanTags INTRO_* / TRIAL_* removedOFFER_*.

Behavioral changes

  • allowDeeplink now defaults to true (was false). Set .allowDeeplink(false) to keep v5 deferred behavior. Preview deeplinks (?preview=1) always display immediately.
  • Storeless errors — purchase/restore now return PLYError.NoStoreConfigured (was PLYError.Unknown "No store found").
  • User attribute mutators return Deferred<Boolean> (setUserAttribute, clearUserAttribute, increment/decrementUserAttribute, etc.) — safe to ignore.

🛠 Build Requirements

  • Minimum Gradle 9.3.0, Kotlin 2.2.x (K2), Java target 11.