android apk版本更新的实现

1 private void installFile(File file) {
2 Intent intent = new Intent(Intent.ACTION_VIEW);
3 intent.setDataAndType(Uri.fromFile(file),"application/vnd.android.package-archive");
4 startActivity(intent);
5 }

这是下载完成之后自动安装新的apk的实现代码。

posted on 2012-02-02 00:52  oasis2008  阅读(358)  评论(0编辑  收藏  举报

导航