title: Android in-app purchase of a subscription with a free trial - how to avoid abuse?
body: <p>I've searched high and low for guidance on how best to address this...
  I've read <strong>Google Play In-App Subscriptions</strong> (<a href="http://developer.android.com/google/play/billing/billing_subscriptions.html" rel="nofollow noreferrer">http://developer.android.com/google/play/billing/billing_subscriptions.html</a>) and the section on <strong>Implementing Subscriptions</strong> (<a href="http://developer.android.com/google/play/billing/billing_integrate.html#Subs" rel="nofollow noreferrer">http://developer.android.com/google/play/billing/billing_integrate.html#Subs</a>) but I still don't see a way to avoid abuse.</p>
  
  <p>I've also seen the related question here - <a href="https://stackoverflow.com/questions/17086041/google-inapp-purchasing-and-trial-period">Google Inapp purchasing and trial period</a>.  However, using the SharedPreferences is subject to relatively easy abuse.</p>
  
  <p>I have an app that will require a subscription for full functionality.  I set up a monthly subscription in-app purchase product, say ID = "myapp.subscription.monthly", costing $0.99/month.
  I want to give people a chance to experience the full functionality, so I give "myapp.subscription.monthly" a 30-day trial period.</p>
  
  <p>When the user installs the app for the first time, they are prompted to purchase the monthly subscription, they are charged $0.00 and told that starting 30 days from now their card will start getting charged $0.99/month.</p>
  
  <p>When my app calls "getPurchases()", the fact that they have a subscription will be returned.</p>
  
  <p>If they cancel during the free trial, or say after a couple of months of billing, a call to "getPurchases()" returns nothing, according to the "Implementing" section:</p>
  
  <blockquote>
    <p>The call returns a Bundle with all the active subscriptions owned by the user. Once a subscription expires without renewal, it will no longer appear in the returned Bundle.</p>
  </blockquote>
  
  <p>Since the user has no active subscriptions, my app will prompt them to purchase the subscription for full functionality.  Again, they will get the 30-day free trial.</p>
  
  <p>I've thought about having a second subscription product, say "myapp.subscription.monthly.no.free.trial" and I would have that be the available item for purchase.  However, without a way to ask Google Play if the user <em>ever</em> previously purchased a subscription, my app can't know that is should be offering the "no free trial" product.</p>
  
  <p>So, how to avoid someone just subscribing and cancelling over and over to keep getting the free 30 days?  Is there a way to ask Google Play for the complete purchase history?</p>