android - android动态交付无法获得用户确认
问题描述
当用户取消需要用户确认的下载请求时,请求状态应该变为 CANCELED。但是,状态侦听器似乎没有收到该状态更改。下面是监听器的示例代码。任何想法?先感谢您!
switch(state.status()) {
case SplitInstallSessionStatus.REQUIRES_USER_CONFIRMATION:
try {
getContext().startIntentSender(
state.resolutionIntent().getIntentSender(),
null,
0,
0,
0);
} catch (Exception e) {
Log.e(TAG, "stats onStateUpdate: ", e);
}
break;
case SplitInstallSessionStatus.CANCELED:
Log.d(TAG, "onStateUpdate: canceled”);
//NEVER GET TO THIS LINE
break;
}
解决方案
这个问题似乎在最近的更新 com.google.android.play:core:1.3.7 中得到了解决。升级后我们无法复制该问题。我们之前使用的是1.3.6。
推荐阅读
- ios - 开发一个 ARKit 应用程序,将文本留给其他人查看
- javascript - 如何自定义 D3 轴标签
- java - 在表格上方添加图片 - Itext
- unity3d - 如何制作迷你高尔夫王等触控控件
- node.js - 安装 npm 时,Mac OS High Sierra 上的 node-gyp 重建失败
- typescript - 如何递归解析类型?
- gitkraken - 使用 git kraken 使用 --no-verify 提交消息
- java - 将 MySQL Azure 与 Java 连接起来
- android - 如何解决 gradle sonarqube 兼容性错误?
- php - PHP通过键和值创建数组组