I searched high and low for guidance on how best to solve this ... I read Google Play In-App Subscriptions ( http://developer.android.com/google/play/billing/billing_subscriptions.html ) and the Implementation section Subscriptions ( http://developer.android.com/google/play/billing/billing_integrate.html#Subs ), but I still donβt see a way to avoid abuse.
I also examined a related issue - the time of purchase and the trial period of Google Inapp . However, using SharedPreferences can be relatively easy.
I have an application that requires a full subscription. I installed a monthly subscription product for in-app purchase, for example ID = "myapp.subscription.monthly", which costs $ 0.99 per month. I want to give people the opportunity to experience full functionality, so I give myapp.subscription.monthly a 30-day trial period.
When the user installs the application for the first time, they are offered to purchase a monthly subscription, they are charged 0.00 rubles, and it is said that starting from 30 days a fee of $ 0.99 per month will be charged from their card.
When my application calls "getPurchases ()", the fact that they have a subscription is returned.
If they cancel during the free trial or say after several months of billing, calling "getPurchases ()" returns nothing according to the "Implementation" section:
The call returns a bundle with all active subscriptions owned by the user. As soon as the subscription expires without an upgrade, it will no longer appear in the returned package.
Since the user does not have active subscriptions, my application will offer them to purchase a subscription for full functionality. Again, they will receive a 30-day free trial.
I thought that I had a second subscription product, say, "myapp.subscription.monthly.no.free.trial", and I would like it to be an affordable item to buy. However, unable to ask Google Play if a user had ever bought a subscription before, my application cannot know what a product should offer without a free trial.
So, how to avoid someone just signing up and canceling again and again to get 30 days free? Is there a way to request Google Play for a complete purchase history?