Android Google In-app-purchases v6 restore purchases without custom server

106 Views Asked by At

I have implemented Google In-app-purchases v6+ library. The user is able to purchase non-consumable virtual item.

When the user re-installs the app or installs the app on the another device with the same GMAIL the app must recover purchased item. But it does not happen. The billingClient.queryPurchasesAsync(params: QueryPurchasesParams) returns empty list of purchased items.

How to obtain that purchased item?

The user must request Purchase that item again, observes the error You already own this item within the Google Billing BottomSheet and then re-run the app.

Only after that dancing with a fire the app retrieves purchased item within the billingClient.queryPurchasesAsync(params: QueryPurchasesParams) result.

How to obtain a list of purchases items within the queryPurchasesAsync(...) function without dancing with a fire?

The app is serverless.


Requesting the billingClient.queryPurchaseHistoryAsync(...) function before querying purchases did not help as well.

0

There are 0 best solutions below