We are working on implementing auto-renew subscription on Google Play. The question we have been trying to figure out is, how to verify if a particular subscription is active (eg. has been renewed).
There is nothing specific in Corona’s documentation, and we have been trying to map Google’s documentation back to Corona API. There appears to be multiple options, and it’s a bit confusing. So, I would love to get some feedback.
- Based on this Google API v3 documentation, there is an additional call that we can do to query subscription status, but is this translated into an Corona API?
https://developer.android.com/google/play/billing/billing_integrate.html#Subs
Bundle activeSubs = mService.getPurchases(3, "com.example.myapp", "subs", continueToken);
- Based on API v2 documentation, there appears to be 2 more approaches. One of them uses Notification (which I am assuming Corona doesn’t support). Another that uses the Google Play Android Developer API to query for subscription status. But is this approach still supported by API v3?
https://developer.android.com/google/play/billing/v2/billing_subscriptions.html
https://developers.google.com/android-publisher/v1_1/purchases/get
- Lastly, at the bottom of the section “Checking Subscription Validity” on this page, it seems to imply that doing a restore will also return the subscription status. While not recommended, this actually appears to be the simplest approach.
https://developer.android.com/google/play/billing/v2/billing_subscriptions.html
What have others done? What do folks recommend? Any feedbacks appreciated!
Thanks!
Andrew