Hey @mobile-app4ap,
You’re correct, the listener is only triggered during the life of the app on your user’s device - it won’t push an update at the moment of expiration (if they are offline when it comes), but it will once that user opens your app the next time. If you’re concerned that a user’s expiration date may have occurred while they were offline and the listener did not trigger due to this, I’d recommend calling `getCustomerInfo` prior to any user accessing paywalled content - this will update any cache and check if the entitlement is still active, and you can react accordingly.
Hello @kaitlin ! Thank you for an answer. I call getCustomerInfo, however, if I’m offline and my subscription expired, I still have entitlement active and I can access an app. I would expect, that if an user is offline, expiration date/time is checked and if now is after this expiration date/time, user has no entitlement active. When user gets back online, status is updated. I would like to confirm, that the way it works right now is a feature, not a bug? I can understand, that RevenueCat follows the rule : it’s better to give access to unsubscribed user, than take access away from subscribed user. However, still I would like to take access away if user is offline and expiration date passed. What is RevenueCat recemmendation in that case?
While considering that problem I also noticed a bug on Android Sandbox. When user is ONLINE and subscription is renewed automatically, customer info listener is triggered and I get correct entitlement data. However, customerInfo.allExpirationDates does not contain the latest expiration date, which is wrong! For example : I had subscription from 2.00 till 2.05. at 2.05 subscription was renewed, I have now active subscription from 2.05 til 2.10. I get correct entitlement data, but in customerInfo.allExpirationDates I get 2.05 instead of 2.10. Please note, that I observed this behaviour only on Android, on IOS it works as expected (dates are updated).