In-App Billing V3 - Purchase an item that expires in 3 months - Android

I have to implement in an Android app a purchase of an item that will expire after 3 months.

I read in the developer guide that I should be using "unmanaged" products, but I also read that in V3 the API of this object is handled as a managed product.

The question is this: After the users buy the unmanaged object, how can I manage the expiration? For example, when the deadline expires, can the user purchase the same product another time if he wants?

+3


source to share


1 answer


Are you using an online database for your application?

If this is true, I think the best way to do this is to generate an end date when the item is purchased and store it in an online database. Then you need to check if the end date is running out in your application (for example, every time the user launches the application, ...).



This works for me, but in my case, the application regularly connects to the online database to work.

Other methods, such as storing the end date in local storage, can be easily hacked.

+1


source







All Articles