Google-IAP
Google-IAP copied to clipboard
Update Subscriptions
Implement the method to Downgrade/Upgrade current subscriptions.
fun updateSubscription (activity: Activity, oldSku: String, purchaseTokenOfOriginalSubscription: String,sku: String) { val flowParams = BillingFlowParams.newBuilder() .setOldSku(oldSku, purchaseTokenOfOriginalSubscription) .setReplaceSkusProrationMode(IMMEDIATE_WITHOUT_PRORATION) .setSkuDetails(fetchedSkuDetailsList.find { it.sku == sku }!!) .build(); val responseCode = iapClient.launchBillingFlow(activity, flowParams) }
I haven't landed on this use case yet. Sorry for the late reply, I was really tied up with college and everything. If you have the knowledge clear on this, please make a PR. Other than that I will deal with this issue when I find the relevant use case myself and that can take a month even more tbh.
Thanks for bringing this up though :)