简体   繁体   中英

Determine when Google Play Store subscription ends

Is it possible to determine when a Google Play Store subscription ends? As far as I know there is no official API where I get this information, right?

For example, let's say a user makes a monthly subscription. So when he pays for that in my app via Google Billing V3 API my app will get the Google Play Service Transaction details as result back. So theoretically I know that this is monthly subscription so I can assume that it will expire in a month.

So is it safe to calculate this by my own? What happens when renewing a monthly subscription? Will Google Billing API V3 return a new Transaction or will still the original (first time the user has subscribed) Transaction be returned?

Basically I just want to display somewhere in my app when the subscription expires as information for the user.

Looks like it's the only strategy on a client side.

But you can get the expiry time from a server side — https://developers.google.com/android-publisher/api-ref/purchases/subscriptions

expiryTimeMillis long Time at which the subscription will expire, in milliseconds since Epoch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM