apk下载成功,启动系统安装界面
代码块
Uri.fromFile(responseInfo.result)该参数微xutils框架中返回的下载文件的本地路径。
public void onSuccess(ResponseInfo<File> responseInfo) {
//下载成功
// 跳转系统安装页面
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(Uri.fromFile(responseInfo.result),"application/vnd.android.package-archive");
startActivityForResult(intent, 0);
}