Question

Check subscription status show random true or false

  • 23 April 2022
  • 1 reply
  • 30 views

Badge

Hi, after i buy my subscription, purchaserInfo show sometimes indicates a purchase, sometimes not

 

With Android Emulator / Flutter

 

Here is my code to check

 checkPremium() async {
Purchases.addPurchaserInfoUpdateListener((purchaserInfo) async {
PurchaserInfo purchaserInfo = await Purchases.getPurchaserInfo();
(purchaserInfo.entitlements.all["remove_ads"] != null &&
purchaserInfo.entitlements.all["remove_ads"]!.isActive)
? print("Active")
: print("Not Active");

setState(() {});
});
}

 

 

1 reply

Userlevel 3
Badge +8

Hi @MArcel, can you share more what you mean by “randomly true or false” (can you share debug logs illustrating this - https://docs.revenuecat.com/docs/debugging#debugging)? It’s expected in sandbox for subscriptions to renew and expire at an accelerated pace, so that might be why you’re seeing entitlements active and then not active minutes later.

Reply