在完成inapp购买后,billingclient.querypurchase()。getPurchaseList()返回null

时间:2019-06-13 21:58:49

标签: android google-play in-app-purchase in-app-billing

我正在使用内部测试员为我的应用进行应用购买测试,我能够购买产品并确认购买,但是当我使用queryPurchases()时。 getPurchasesList()返回null。请帮助

1 个答案:

答案 0 :(得分:0)

billingclient.querypurchase()。getPurchaseList()仅当responseCode为ITEM_ALREADY_OWNED时,才适用于2.x版本。您应该检查他们的样本。

https://github.com/googlesamples/android-play-billing/blob/master/TrivialDriveKotlin/app/src/main/java/com/kotlin/trivialdrive/billingrepo/BillingRepository.kt#L135