SubscriptionStatusProvider

Provides subscription status information from the billing service.

This interface abstracts the subscription status querying logic, making it easier to test and swap implementations.

Inheritors

Functions

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

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

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

Gets the subscription state for a purchase.

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

Gets whether the subscription will auto-renew.

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

Determines if a purchase is currently active.