I'm using Play Billing Library v1.0 for In-app Billing support in Android app and would like to allow users to renew a subscription manually during its active period to extend it by the appropriate period.
It can be handy for different sales (Black Friday, New Year, etc.), when users can extend their subscriptions with discount.
According to the official documentation, this behavior really can be achieved. But I found no information how to implement it.
I'm using the following standard code to buy a subscription:
BillingFlowParams.Builder builder = BillingFlowParams.newBuilder()
.setSku(skuId).setType(SkuType.SUBS);
int responseCode = mBillingClient.launchBillingFlow(activity, builder.build());
If I try to buy the same subscription again, the
"You're already subscribed to XXXXX [OK]"
error message appears.
I also tried to use .addOldSku()
builder method and pass the same sku here, but it does not help either.