转:Android程序使用代码的安装和卸载!
安装:
?打开APK程序代码:private void openFile(File file) { // TODO Auto-generated method stub Log.e("OpenFile", file.getName()); Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive"); startActivity(intent); }?转自:http://www.cnblogs.com/Greenwood/archive/2011/03/09/1979268.html