Search code examples
androidhuawei-mobile-serviceshuawei-developersappgallery

When HMS Core is outdated an error is returned


If HMS Core is outdated an error -1 core error is returned when calling

IapClient.isEnvReady()

There is a possibility to disable automatic update of the HMS Core. At some point, when it is outdated, if an app is started and there is a call to IapClient it always returns -1 core error. When HMS Core is updated and a device is restarted, then performing calls to IapClient works fine.

Is there any possibility to get meaningful error and, maybe, get an intent to update HMS Core?


Solution

  • The method IapClient.isEnvReady() is to check whether the currently signed-in HUAWEI ID is located in a location where HUAWEI IAP is available. If your HUAWEI ID is located in the suppported locations, the check will pass.

    In Addition, if HMS Core version of the test device is too low, the app will automatically call a pop-up asking the user whether to update HMS Core Apk.

    Thanks