-
Notifications
You must be signed in to change notification settings - Fork 4
Purchase Categories
Muhammad Hammad edited this page Nov 29, 2025
·
1 revision
AdManageKit v2.9.0 introduces a category system for classifying in-app products.
| Category | Description | Disables Ads | Re-purchasable |
|---|---|---|---|
CONSUMABLE |
Virtual currency, power-ups | No | Yes (after consume) |
FEATURE_UNLOCK |
Level packs, themes | No | No |
LIFETIME_PREMIUM |
Permanent premium access | Yes | No |
REMOVE_ADS |
Ad removal only | Yes | No |
// Consumable - coins, gems, credits
PurchaseItem("coins_100", TYPE_IAP.PURCHASE, PurchaseCategory.CONSUMABLE)
// Feature unlock - doesn't disable ads
PurchaseItem("dark_theme", TYPE_IAP.PURCHASE, PurchaseCategory.FEATURE_UNLOCK)
// Lifetime premium - disables ads, grants all features
PurchaseItem("lifetime", TYPE_IAP.PURCHASE, PurchaseCategory.LIFETIME_PREMIUM)
// Remove ads only - just removes ads
PurchaseItem("remove_ads", TYPE_IAP.PURCHASE, PurchaseCategory.REMOVE_ADS)
// Subscription (category not applicable)
PurchaseItem("premium_monthly", "trial_offer", TYPE_IAP.SUBSCRIPTION)Only certain categories cause isPurchased() to return true:
// isPurchased() returns true for:
// - Any active subscription
// - LIFETIME_PREMIUM purchases
// - REMOVE_ADS purchases
// isPurchased() returns false for:
// - CONSUMABLE purchases
// - FEATURE_UNLOCK purchases
// - No purchases// Check by purchase type
when (AppPurchase.getInstance().getActivePurchaseType()) {
PurchaseType.SUBSCRIPTION -> showSubscriberUI()
PurchaseType.LIFETIME_PREMIUM -> showLifetimeUI()
PurchaseType.REMOVE_ADS -> hideAdsOnly()
PurchaseType.NONE -> showPurchaseOptions()
}
// Check specific categories
AppPurchase.getInstance().hasLifetimePremium() // LIFETIME_PREMIUM
AppPurchase.getInstance().hasRemoveAdsPurchase() // REMOVE_ADS
AppPurchase.getInstance().hasLifetimePurchase() // Any lifetime (LIFETIME_PREMIUM or REMOVE_ADS)val item = PurchaseItem("product", TYPE_IAP.PURCHASE, PurchaseCategory.LIFETIME_PREMIUM)
item.shouldDisableAds() // true - LIFETIME_PREMIUM disables ads
item.isLifetimePurchase() // true - one-time purchase (not subscription)
item.isConsumable // false - not a consumableWhen creating a PurchaseItem without specifying a category:
// Default is LIFETIME_PREMIUM (v2.9.0+)
PurchaseItem("product", TYPE_IAP.PURCHASE)
// Equivalent to:
PurchaseItem("product", TYPE_IAP.PURCHASE, PurchaseCategory.LIFETIME_PREMIUM)- Always specify category explicitly for clarity
- Use CONSUMABLE for any product users can buy multiple times
- Use FEATURE_UNLOCK for one-time unlocks that don't affect ads
- Use LIFETIME_PREMIUM for permanent "premium" access
- Use REMOVE_ADS when you have separate ad removal and premium tiers
AdManageKit v3.3.4 | GitHub | API Docs | Report Issue | Buy me a coffee