I am using Revenuecat (purchases_flutter: ^3.7.0) plugin in my Flutter Android app. However I noticed, even if the (test) subscription has been ended the code shows it is still active.
I am using the following method to determine whether the subscription is active or not.
static isUserSubscribed() async {
bool _isSubscribed = false;
await Purchases.setDebugLogsEnabled(false);
await Purchases.setup(revenueCatId);
if (userId != null) {
await Purchases.setup(revenueCatId, appUserId: userId);
PurchaserInfo purchaserInfo = await Purchases.getPurchaserInfo();
if (purchaserInfo.entitlements.allt"Ads Free"] != null &&
purchaserInfo.entitlements.allt"Ads Free"].isActive != null &&
purchaserInfo.entitlements.allt"Ads Free"].isActive) {
// it comes here even though the subscription has been expired
_isSubscribed = true;
}
return _isSubscribed;
}
I noticed, when I do test purchase and even after the subscription has been ended the above method returns true always. I even restarted the app and logged out and even clear the memory too.
If I go to revenucat.com and remove the user by searching the email address then it start returning false. My test subscription was expired in the morning around 9:00 AM but in the evening also it showing active in the app.
Thank you