Search code examples
androidkotlingoogle-playandroid-billing

How to call BillingClient::queryProductDetails in Kotlin without knowing any product IDs?


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?


Solution

  • 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.