简体   繁体   中英

How determine from client side if Google Play Billing subscription is expired

I have implemented Subscriptions in mine Android app, and wondering how to check expired subscription. As I understood, expired subscription should not be returned in getPurchases() method.

The problem is - I tested 1 month subscription using test account (which renews subscription every 5 minutes, as described here https://developer.android.com/google/play/billing/billing_testing#testing-subscriptions ), and after expiration time I still recieved that purchase in getPurchases() , even after 1 day. However, if I manually tried to subscribe one more time, Play Market didn`t refuse, and everything worked fine. Also, when I was selecting 'decline payment' in subscription settings, it dissapeared from purchases list, as it supposed to be.

Thanks in advance.

I didn't understand what do you mean by "renews every 5 minutes". Once you subscribe to Google play to any app/service, it will be available until the end of the subscription.

For example: I purchased a subscription with an APP for 6 months. I went to Google Play after 2 days and canceled my subscription but the app will still see that I am subscribed for the remaining 6 months because I already paid the subscription fees.

It's not something that you can handle from Google Play:)

Hope this helps.

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