i guess you do define it in the billing settings, right?
Store a list of all your products (using their id) with the defined expire time. Use the known list when checking the used products.
Never used in-app-billing in my apps so it is just a guess/suggestion
i guess you do define it in the billing settings, right?
Store a list of all your products (using their id) with the defined expire time. Use the known list when checking the used products.
Never used in-app-billing in my apps so it is just a guess/suggestion
i would use my server to get the actual time. Ignoring timezone differences you should be able to compare it to the device time if it can be "correct".
Right I have fixed time periods but I think I read that this time won't change even if user has re-subscribe so in this case how can I know the new expiry date ?
10 minutes before i thought, i have to consume the oldest purchase and then i get the next one, but in the meantime i found out, that's impossible to consume an subscription.
10 minutes before i thought, i have to consume the oldest purchase and then i get the next one, but in the meantime i found out, that's impossible to consume an subscription.
10 minutes before i thought, i have to consume the oldest purchase and then i get the next one, but in the meantime i found out, that's impossible to consume an subscription.
That's because a subscription is valid until the expiry date, even if the user has canceled it. You don't need to consume it anyway because renewals are handled by Play Store, not your app.
All you need to do is check the status of the subscription when the app starts & take action in the app accordingly.
Well I save a copy of the subscription status on the device & use it as a fallback if I can't get a status from Play Store. Every time the app starts I try to check the status & if I get a response from Play Store I update my local copy of the status. If I can't get a response, I use the last known state. I don't go as far as storing it in a database, I just write it to a config file in DirInternal. I figure the average user doesn't have the knowledge to hack DirInternal to try & get a free subscription - & even if they do, the subscription state will get updated every time they start the app.