Is there a way to get a user's expired subscriptions from Google Play? I am making a magazine-style app, and I want users to have access to content that was published while their subscription was active, regardless of whether they currently have a subscription. For example, if the user buys a month's subscription on the 1st June, then cancels it before the end of the June, from July onwards they should still have access to any content published in June.
Using Google's IabHelper.java
example library, there doesn't seem to be a way. Continuing the above example, starting from July the queryInventory()
methods no longer show the subscription at all. That prevents us from retrieving the purchaseToken
, which in turn prevents us from using the Google Play Developer API. (As documented here, the Purchases.Subscriptions:get()
method requires the token.)
I realise we can locally cache the tokens when the user makes a purchase, but that doesn't work across multiple devices. To keep their purchases on multiple devices, we'd need to store the purchase tokens on a server. However, that would require that the user have a way to log in to our server in order to retrieve their tokens, which adds more complexity.
Is there a better way?