anjlab/android-inapp-billing-v3

onProductPurchased() is not getting called in case of Non-Consumable product (One time purchase).

manishSharmaJmd opened this issue · 2 comments

I have updated library to 2.0.0 and when i am trying to purchase a non consumable product ( one time ), then after the payment
onProductPurchased() is not getting called. I have tried with test users by adding email in License Testing on Google Play Console.

Though i took @Equin patch (Migrate to v4) one day before and added into my project, which works well!

Note: I have tried BillingProcessor in the both way, Singleton and Normal way, both are giving same results.
I don't know about other product types like Consumable or Subscriptions, as i have tried only Non-Consumable yet.

Make sure you are create one BillingProcessor. Remember release after use.
onProductPurchased call first BillingProcessor init.

@newstarsoftware how do you expect this to work when you have multiple activities with billing protocols in them?

Anyways I created this singleton class to fix the issue.

@manishSharmaJmd it should also fix your problem.
the usage example is in the gist: https://gist.github.com/kcochibili/de641c434ec6fe7236004009d9b09727