PlayBillingSubscriptionStatusProvider

Default implementation using Google Play Billing. Kept for its public signature; it converts each Play purchase to the neutral form and runs the SDK's own status logic.

Constructors

Link copied to clipboard
constructor(billing: Billing)

Functions

Link copied to clipboard
open override fun getOfferType(purchase: Purchase, product: StoreProduct?): LatestPeriodType?

Gets the offer type (trial, promotional, etc.) for a purchase.

Link copied to clipboard
open suspend override fun getSubscriptionState(purchase: Purchase, product: StoreProduct?): LatestSubscriptionState

A purchase returned by queryPurchases is entitled now, so PURCHASED means SUBSCRIBED. Play Billing has no client-side expiry, grace or hold signal, so we don't try to derive one from purchaseTime (which stays at the original purchase across renewals). When there's no current purchase at all, see ReceiptManager.lastSubscriptionProperties.

Link copied to clipboard
open override fun getWillAutoRenew(purchase: Purchase): Boolean

Gets whether the subscription will auto-renew.

Link copied to clipboard
open suspend override fun isActive(purchase: Purchase, product: StoreProduct?): Boolean

Determines if a purchase is currently active.