Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting the expiration date for Google Play In-App Subscriptions

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.

like image 847
M Dapp Avatar asked May 30 '12 18:05

M Dapp


People also ask

Why can't I see my subscriptions on Google Play?

If you can't find your subscriptions, check that you're signed in to the correct account. Make sure to sign in to the Google Account that has your subscriptions. Learn how to add an account or switch accounts. The email you used with the subscription app may be different than your Google Account.

What is Google Play annual subscription?

Google Play Pass offers hundreds of Android games and apps (close to 1,000 in total). The library boasts many titles that usually cost money, and there are no ads or in-app purchases in any of the included content.

Is there an app to cancel subscriptions?

Truebill was named one of Forbes' 50 most innovative fintech companies in 2021. The company offers its basic services for free, and has a sliding scale for premium services. Users who don't pay will need to cancel their subscriptions manually, but Truebill will cancel subscriptions for premium users.


1 Answers

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.

like image 52
IBoS Avatar answered Oct 16 '22 06:10

IBoS