Huawei In App Purchases, Purchase is not available on Version 4.0

Viewed 167

I am usint Huawei In App Purchase in my application. I recently switched from HMS v2 to v4.

I am able to do purchases with v4, it correctly delivers the license states, everything works correctly.

But it does not recognize the purchase that a user made with a previous app version that used the HMS v2 SDK.

The method

obtainOwnedPurchases() 

works successfully, but the result

inAppPurchaseDataList

does not contain any item.

In that scenario user have to buy same item again which he/she already paid for and this is not acceptable. What can I do to make it available to them again as they never should pay twice for a non-consumable?

1 Answers

If you upgraded the SDK, I suggest that using the both interfaces for version 2.0 and 4.0 together. Call v2.0 interface for query, then call v4.0 interface for query, collect the results afterwards when you complete two queries for different versions.

Related