android 实现批量安装apk功能

[b]在android程序,实现了下载功能,用户可以批量下载多个apk程序,但想在用户下载完这些apk后,将这些apk进行批量安装。请问如何实现这种功能。[/b]

public static boolean runRootCommand(String command) {
Process process = null;
DataOutputStream os = null;
try {
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(command+"\n");
os.writeBytes("exit\n");
os.flush();
process.waitFor();
} catch (Exception e) {
Log.d("*** DEBUG ***", "Unexpected error - Here is what I know: "+e.getMessage());
return false;
}
finally {
try {
if (os != null) {
os.close();
}
process.destroy();
} catch (Exception e) {
// nothing
}
}
return true;
}
}
http://lazyhack.net/writing-an-android-root-application/

有是有个办法 但是要有ROOT权限啊 ,就是在代码中执行adb install命令

Runtime.getRuntime.exec( "for i in ("/scard/*.apk") adb install i")
试试把

你自己可以在界面画个进度条啊

然后启动个 AsyncTask 更新进度条啊