Android 代码安装APK文件

代码安装APK文件

Intent intent = new Intent(Intent.ACTION_VIEW);   
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file),"application/vnd.android.package-archive");    
startActivity(intent); 

 

posted @ 2014-12-15 14:40  rfheh  阅读(180)  评论(0编辑  收藏  举报