apk版本升级 的问题, 一直提示更新是怎么回事?有碰到过的吗
小小乐宝 2016-09-07 06:36:30 自己写的更新app的接口 当判断versionCode 小于服务器上的 versionCode 提示更新,并从自己的服务器上下载apk包
进行安装 安装完成后也没提示失败 ,在重新打开app 后 又提示更新。只有部分手机用户出现这种问题
怎么解决?
下载完apk 文件后 , 掉用下边的接口进行安装的
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.parse("file:" + filePath);
String type = "application/vnd.android.package-archive";
intent.setDataAndType(uri, type);
context.startActivity(intent);