0

I change my android package name and create subscriptions with same reference SKU code.

When my code below runs, it gives item could not be found. Before changing the package name, everything works. Would you please tell me whether I should change the subscription SKU code?

I swear I have rollout my app to alpha release, just now.

Here is my client app working:

val skusList = arrayListOf<String>()
            skusList.add(selectedSku)
            val params = SkuDetailsParams.newBuilder().setSkusList(skusList).setType(BillingClient.SkuType.SUBS).build()

            playStoreBillingClient.querySkuDetailsAsync(params
            ) { billingResult, skuDetailsList ->
                println("billingResult : $billingResult")
                if(billingResult == BillingClient.BillingResponse.OK) {
                    println("skuDetailsList : $skuDetailsList")
                    println("I want to purcahse sku : $selectedSku")

                    subscriptionList = ArrayList(skuDetailsList)
                    val fetchedPackage = subscriptionList.firstOrNull ()
                    if(fetchedPackage !=null){
                         selectedSkuPackage = fetchedPackage
                        val builder = BillingFlowParams.newBuilder()
                            .setSku(selectedSku).setType(BillingClient.SkuType.SUBS)
                        val responseCode = playStoreBillingClient.launchBillingFlow(this, builder.build())
                    }

                }else{
                    Toast.makeText(this, "No subscription" , Toast.LENGTH_SHORT) . show()
                }
            }
Kishan Viramgama
  • 893
  • 1
  • 11
  • 23
Jeff Bootsholz
  • 2,971
  • 15
  • 70
  • 141

0 Answers0