When testing subscriptions, it turned out that canceled subscriptions remain active even after their expiration date. At the same time in Google Play subscription list is empty. I tried two popular IAB libs (in-app-billing v3 and android-checkout).
What causes the problem? Is the problem relevant only when testing? Is there a way to check if the subscription is truly active without the need of running own backend?
bp = new BillingProcessor(a,
"xxx",
new BillingProcessor.IBillingHandler() {
...
@Override
public void onBillingInitialized() {
bp.loadOwnedPurchasesFromGoogle();
bp.isSubscribed(planId); // true for expired cancelled subscription that is not listed in google play
}
});
UPD
I implemented in-app billing without external libs by official guidelines (https://developer.android.com/google/play/billing/billing_integrate.html) and now it works as intended although i have to wait some time to cancelled expired subscription become inactive (sometimes an hour, sometimes a day).
you may try this one.
purchase.getPurchaseState()
// 0 (purchased), 1 (canceled)- 2 (refunded).
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