- private void installApk(){
- Intent intent = new Intent();
-
- intent.setAction(Intent.ACTION_VIEW);
- String name = DownloadManager.getFileName(updateInfo.getUrl());
- File file = new File(Environment.getExternalStorageDirectory(),name);
- intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
- startActivity(intent);
- }
复制代码 |