Reputation: 1530
The implementation of the new in-app subscription product for Android apps seems identical to regular managed/unmanaged products, but (afaik) getting the expiration date for subscriptions is only available through the Google Play Android Develope HTTP-based API. That part has me clueless.
Any implementation examples using the Google APIs Java Client Libraries for getting the expiration date would be a huge help.
Upvotes: 7
Views: 2069
Reputation: 550
Well, you can always calculate the expiration date using the AIDL for subscriptions. If you request RESTORE_TRANSACTIONS
(assuming you have no previous local data) you'll get the purchase date and the current state of the the subscription and a couple of other data. If you have a monthly subscription and you are far beyond the first month you have to check current state (which could be automatic using receivers for PURCHASE_STATE_CHANGE
pushes from Play Store). Knowing the state and purchase date you can calculate the expiration date.
Upvotes: 1