Open mujahid-dzinemedia opened 2 years ago
.setOfferToken("") try this way.
If you want to give offer than refer this doc. https://developer.android.com/google/play/billing/integrate Hope this will be helpful:)
Bump, this error make sub crash! @akshaaatt
yes, it crashed... here is the logcat.
at com.google.android.gms.internal.play_billing.zzm.zzc(com.android.billingclient:billing@@5.0.0:1)
at com.android.billingclient.api.BillingFlowParams$ProductDetailsParams$Builder.build(com.android.billingclient:billing@@5.0.0:2)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:105)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:99)
at com.aemerse.iap.BillingService.toProductDetails(BillingService.kt:326)
at com.aemerse.iap.BillingService.launchBillingFlow(BillingService.kt:99)
at com.aemerse.iap.BillingService.subscribe(BillingService.kt:95)
at com.aemerse.iap.IapConnector.subscribe(IapConnector.kt:65)```
java.lang.NullPointerException: offerToken is required for constructing ProductDetailsParams.
at com.google.android.gms.internal.play_billing.zzm.zzc(com.android.billingclient:billing@@5.0.0:1)
at com.android.billingclient.api.BillingFlowParams$ProductDetailsParams$Builder.build(com.android.billingclient:billing@@5.0.0:2)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:115)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:105)
at com.aemerse.iap.BillingService.toProductDetails(BillingService.kt:335)
at com.aemerse.iap.BillingService.launchBillingFlow(BillingService.kt:105)
at com.aemerse.iap.BillingService.buy(BillingService.kt:92)
at com.aemerse.iap.IapConnector.purchase(IapConnector.kt:61)`
https://stackoverflow.com/questions/72351444/android-in-app-billing-v5-subscription-with-trial-period https://developer.android.com/google/play/billing/subscriptions
@akshaaatt Please update library its crashing when subscribe