标签:
public void installApk() {
File apkfile = new File(Environment.getExternalStorageDirectory(),
strApkFile);
Log.i("Update", apkfile.getAbsolutePath());
if (!apkfile.exists()) {
Log.d("Update", "文件不存在");
return;
}
Log.i("Update", "启动");
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file://" + apkfile.toString()),
"application/vnd.android.package-archive");
startActivity(i);
}
标签:
原文地址:http://www.cnblogs.com/PeijueerOrJacking/p/4468779.html