标签:android
* 安装apk
*/
private void installApk() {
// 获取当前sdcard存储路径
File apkfile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/updateApkFile/" + info.getApkName());
if (!apkfile.exists()) {
return;
}
Intent i = new Intent(Intent.ACTION_VIEW);
// 安装,如果签名不一致,可能出现程序未安装提示
i.setDataAndType(Uri.fromFile(new File(apkfile.getAbsolutePath())), "application/vnd.android.package-archive");
mContext.startActivity(i);
}
标签:android
原文地址:http://blog.csdn.net/u014608640/article/details/38758151