Xml代码

<uses-permission android:name="android.permission.INSTALL_PACKAGES" />

Java代码

Uri uri = Uri.fromFile(new File("/sdcard/temp.apk")); //这里是APK路径
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri,"application/vnd.android.package-archive");
startActivity(intent);

posted on 2011-06-03 08:59  AlexCheng  阅读(434)  评论(0编辑  收藏  举报