下载app文件后,使用代码方式安装 app
String s = new String(Environment.getExternalStorageDirectory().getAbsolutePath()
+ "/Download/1.apk");
LogUtil.i("qq--" + s);
installApp(s);
//安装app
private void installApp(String path) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(Uri.parse("file://" + path),
"application/vnd.android.package-archive");
startActivity(intent);
}