英文:
How to call BillingClient::queryProductDetails in Kotlin without knowing any product IDs?
问题
我想使用Play商店的BillingClient来获取我的应用程序所有待售产品的列表,而不想在客户端上硬编码我的产品列表,因为客户端上的ID和Play商店上的ID很容易不同步。这是否可能?
英文:
I would like to use the Play Store BillingClient to get a list of all products for sale for my app and I don't want to have to hard-code my product list on the client because the IDs on the client and IDs on the Play Store can easily get out of sync. Is this even possible?
答案1
得分: 0
无法查询产品而不知道它们的ID。唯一的解决方案是将它们与远程服务同步,以便它们不会硬编码在客户端上。
英文:
It's impossible to query products without knowing their ids. The only solution is to sync them with a remote service so they are not hardcoded on the client.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论