Search code examples
androidin-app-purchasein-app-billing

My in-app purchases is not working in production mode in android?


I have developed one application in android with in-app purchases feature.

First I tested my application with test purchases using android.test.purchased it works fine when I tested using test purchases.

Second I uploaded new application with different SKU like product id's in playstore as a beta version and I tested that application using test accounts then also it is working fine and it is purchased. And I added in-app products in playstore.

But the problem is when I promote my beta test version into production it is not purchasing what I want, first it is purchasing and when I click one next time again also it is asking for purchase so every time it asking for purchase it s not proceeding to next action.

I followed this tutorial to implement in-app purchases [in-app purcahses in android


Solution

  • In my application I have used mHelper.onConsumeAsync(). So I removed this method when I click on the button so next time it is not consuming(means not asking for purchase second time).

    So it is useful for consumable products like subscribed products(Non-Managed products).So I am not used that kind of products I used only Managed products when purchase product I am not purchasing again and these transaction will be managed by google.