当前位置:网站首页>华为应用已经调用了checkAppUpdate接口,为什么应用内不提示版本更新
华为应用已经调用了checkAppUpdate接口,为什么应用内不提示版本更新
2022-07-26 14:38:00 【华为开发者论坛】
问题描述
应用已上线,我再更新了华为游戏服务SDK之后,测试发现应用启动后不弹版本更新提示。但我确实按照官方指导文档要求,已经调用了checkAPPUpdate检测更新接口。
参考文档:游戏升级
问题分析和解决
我找到华为技术支持,对方让我先自行检查一下几点:
- 接口调用代码是否正确。
- 由于应用已上线,可以把更新包的版本号versionCode改小(比线上包的版本号小),看看本地安装更新包启动后是否会弹出版本更新提示——华为应用的升级逻辑是根据版本号来的,只要线上有新版本(版本号比本地的大),就会提示升级。
- 应用启动后,可以取全量日志看下,如果能搜到UpdateSDK version is:xxx信息日志,也能说明接口已经调用。
我对照上面三点都检查了下,确定接口调用了。
把日志发给华为技术,对方发现报错信息如下:
Updateinfo is not recommend, reason: Uninstall the old version before installation ,is same signature: 1
这个报错说明我的游戏在不推荐更新列表里面,因为签名不一致。
这种情况,SDK不会提示更新,但是去应用市场会看到相关提示语。然后我打开应用市场搜索游戏,果然看到了:“更新包签名与旧版本不一致,需先从设备上完全卸载旧版本才可更新。可能导致程序数据或游戏存档丢失,是否继续卸载”。

但是我自己检查了下,确定签名没有更改过。
然后华为技术支持通过appid查询到我们游戏加入了华为的签名服务:
且当时勾选的是这个选项:

如果选择“让AG Connect 创建并管理我的应用签名密钥”,AGC会对应用生成一个新的签名密钥,并使用新的签名密钥对应用重签名。简单可以理解为,我自己出包的时候签名是A,使用这种方式的签名服务后,华为做了重签名,所以线上包的签名变为B,而签名B我是无法获取的,此时我本地出新包,用的还是签名A,这样新包和线上包签名就不一样了。所以就算checkAPPUpdate接口调用,且把versionCode改小了去测试,应用内不会提示版本更新,在应用市场里会提示签名不一致。只有当新包上线了,之前在应用市场上下载老包的玩家,才会在应用里被提示有版本更新。
如果选择“导出并上传密钥和证书”,AGC会使用CP上传的签名密钥对应用重签名,也就是说,这种方式下,只要我的新包是用我自己签名和上传密钥,就可以在新包上线前,本地测试应用内弹出版本更新框了。
在华为技术的分析说明下,我确认新包签名不变后,提交了审核。
PS:
上面两种华为“应用签名密钥”选项,一旦选择其一,不支持修改。
如果新包用的签名和之前老包的(我自己的)签名不一致的话,审核会提示签名不一致并驳回的。(而不是在应用市场里面提示啦)
签名服务一旦加入了,不能删除,不过可以重新创建一个应用。
边栏推荐
- Lingo软件的使用
- Mysql-04 storage engine and data type
- Keyboard shortcut to operate the computer (I won't encounter it myself)
- SA-Siam:用于实时目标跟踪的孪生网络
- sp导出贴图到maya
- 【常微分方程求解及绘图之求解小船行走轨迹】
- C# NanUI 相关功能整合
- AMB | towards sustainable agriculture: rhizosphere microbial engineering
- The development of smart home industry pays close attention to edge computing and applet container technology
- 过滤器和拦截器的区别
猜你喜欢

What is the transport layer protocol tcp/udp???

Introduction to C language must brush the daily question of the collection of 100 questions (1-20)
Network pictures are transferred locally, causing the kernel to exit

9、学习MySQL DELETE 语句

Tdengine helps Siemens' lightweight digital solution simicas simplify data processing process

填问卷,领奖品 | 诚邀您填写 Google Play Academy 活动调研问卷

次轮Okaleido Tiger即将登录Binance NFT,引发社区热议

OpenCV中图像算术操作与逻辑操作

The development of smart home industry pays close attention to edge computing and applet container technology

C nanui related function integration
随机推荐
WPF 常用功能整合
Summary and analysis of image level weakly supervised image semantic segmentation
1.两数之和
Kubernetes ---- pod configuration resource quota
Advanced MySQL v. InnoDB data storage structure
Mysql-04 storage engine and data type
Introduction to C language must brush the daily question of the collection of 100 questions (1-20)
What is the transport layer protocol tcp/udp???
Figure introduction to neural network core dataset
Lean product development: principles, methods and Implementation
当AI邂逅生命健康,华为云为他们搭建三座桥
【方差分析】之matlab求解
【愚公系列】2022年7月 Go教学课程 017-分支结构之IF
14. Bridge-Based Active Domain Adaptation for Aspect Term Extraction 阅读笔记
10 schemes to ensure interface data security
leetcode汇总
Siamrpn: recommended regional network and twin network
Would you please refer to the document of Database specification?
CAS based SSO single point server configuration
Maya imports the model into unity