I'm trying to create a simple subscription validation service, but i need help, since i'm still learning the library. #2638
Unanswered
Vittor-Javidan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, my app is suppose to work offline, and i'm trying to create a service that's connect to the app store (Currently only play store), to detect automatic if the user is a premium subscribe or a free user every time he first render the app home screen.
If its a premium subscribe, my app gives 4 days of Offline usage with premium resources enable in case user lose internet, and this time is refreshed every time the user goes to home screen.
Since i did not find a way to test a expired subscription, i want to know if the line of code
const purchases = await getAvailablePurchases({ onlyIncludeActiveItems: true });
will return expired purchases, or just the ones that is really currently active. I know the method and its parameters explain itself, but i want just to be sure having someone confirmation to have less bugs as possible.OBS 1:
OBS 2:
My service code:
Beta Was this translation helpful? Give feedback.
All reactions