好吧,我使用此代碼來獲取手機上的應用程序列表,但我如何在屏幕上顯示它們?如何顯示已安裝在Android手機上的應用程序列表中的列表?
final PackageManager pm = getPackageManager();
List<applicationinfo> packages = pm
.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
Log.d(TAG, "Installed package :" + packageInfo.packageName);
Log.d(TAG,
"Launch Activity :"
+ pm.getLaunchIntentForPackage(packageInfo.packageName));
}
我試着在列表視圖中顯示它們但有一點麻煩的IM。有人可以幫忙嗎?
請參閱[本文](http://androidboss.com/getting-list-of-installed-applications-in-android/)。 – Mudassir 2011-03-22 10:57:44