I have implemented in-app purchase
for subscription
product, It's working fine. I have set 1 month subscription for each product, and it will get renew after 1 month.
Now my question is does there any way to get renewed product list and renewal date?
Does google provide any kind of service or event through which we can get to know about renewal.
Unfortunately, the In-app Billing API v3
does not provide any event or kind of way to be notified of subscription renewal or cancelation.
The only thing that you can do is manually query the API to retrieve the currently activated subscription. (This is valid for the Android API as well as the http based ones…)
The way to do this is from an Android client is :
Query the inventory as you usually do to get the list of products with IabHelper#queryInventory(boolean querySkuDetails, List<String> moreItemSkus, List<String> moreSubsSkus)
If the user has an active subscription, you will be able to get the purchase about it with IabHelper#getPurchase(String sku)
. The purchase will contain the information about the subscription state and time. (doc here)
To do this with the Google Play Developer API
(from your serveur), you have to use get, the informations will be in the ressource returned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With