Repository navigation
6.2.0
Added
- Custom events. Send a business event from your app with
Purchasely.emit(name, properties). A custom event declared in the Console can trigger a campaign and can measure a campaign, a flow or an A/B test. A screen can also send a custom event with the new "Track event" action. The name must match the Console declaration exactly. Supported property types:Int,Long,Float,Double,Boolean,String,Dateand a list ofString. - New built-in attributes
ply_active_subscriptionsandply_expired_subscriptions. Each one is a list of the user's subscriptions, so you can target an audience on the details of a subscription. PLYPlan.dump()returns a full text report of a plan and of its Google Play product. Use it to debug a price, a period or an offer, and attach it to a support request.
Changed
- Source compatibility:
PLYEventhas a new subclass. If your code useswhen (event)onPLYEventwithout anelsebranch, add anelsebranch. - Source compatibility:
StoreType.WEB_CHECKOUT_STRIPEis nowStoreType.STRIPE. - Source compatibility:
PLYPurchaseResponse.expiredSubscriptionsis now nullable.nullmeans that the answer says nothing about expired subscriptions. - A paywall fetch without an API key now fails with
PLYError.Configurationinstead ofPLYError.Network. The SDK sends no request. - When the configuration request fails at start, the error keeps the real HTTP status code.
- A Google Play network error during a purchase now ends the purchase without an alert. Your
onErrorcallback receives the network error. - The SDK starts faster when the user has a long subscription history.
- Media3 update to 1.11.1 in the
playermodule.
Fixed
- The SDK no longer reports "In-app purchase failed" events when no purchase is in progress.
- The callbacks of
purchase(),restoreAllProducts()andsilentRestoreAllProducts()now answer only the call that started them. - A paywall no longer freezes after two purchase attempts that end with the same result.
- The SDK keeps a subscription whose plan is not in the app catalog (for example a web subscription).
- A login now transfers the subscriptions that the user bought or redeemed while anonymous, and tries a failed transfer again at the next login.
- The subscription built-in attributes now reset when the user has no active or no expired subscription.
- An inline paywall (
buildView) no longer sends aCloseaction when its host screen goes away.PLYInterceptorInfo.presentationis now set for theCloseaction. - On Android TV, the paywall now works with the remote control (D-pad).
Purchasely.closeAllScreens()now closes all stacked screens.onOpenPresentationandonOpenPlacementnow run once per action.presentation.metadatais no longer lost on a full-screen paywall.- Each public callback API now calls one callback only, also when your success callback throws an exception.
Purchasely.setAttributes()accepts an empty map.getBuiltInAttribute()no longer returns an internal backend key.- A deeplink with an upper-case
PLYhost now opens. - A countdown label that shows only months now refreshes.
- In dark mode, an image with an empty dark URL now uses its light URL.
retrieveLogs()now keeps the last 200 lines.- A property with a
NaNor infinite number inside a list or a map no longer causes the loss of the full request. - The SDK reports one result when the last receipt validation request fails.
- A paywall purchase button no longer stays blocked after an error that shows no alert.
- A paywall shows its prices sooner after a configuration refresh.
- A flow sheet or modal no longer crashes or closes when a late dismiss or navigation request arrives.
Full changelog: 6.1.1...6.2.0