可能重複:
Is it possible to programmatically uninstall a package in Android在android中卸載應用程序?
我們可以通過以下步驟來刪除軟件包:
Uri uri = Uri.fromParts("package", strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity(it);
但這種方式,應用程序管理器的用戶界面會顯示出來,我的問題是如何靜默刪除軟件包(沒有顯示Applications Manager的UI)。