调用版本检测updateManager.checkAppUpdate接口,返回的数据如下:
checkAppUpdate business error:{"code":100940005}
代码如下:
updateManager.checkAppUpdate(context)
.then((checkResult: updateManager.CheckUpdateResult) => {
LogUtils.logII(TAG, 'checkAppUpdate checkResult updateAvailable:' + checkResult.updateAvailable);
if (checkResult.updateAvailable == 1) {
// 有新版本
this.showUpdateDialog(context);
} else {
if (showHintDialog) {
showHintDialog();
}
}
}).catch((error: BusinessError) => {
LogUtils.logII(TAG, 'checkAppUpdate business error:' + JSON.stringify(error));
});
官网找的的错误码表如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/store-error-code-V5最多只到10093开头,想知道这个错误码什么意思?
1009400005错误码的描述:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/store-error-code-V5\#section193621131990,是打开“应用市场客户端”没有同意隐私政策导致。