Hi,
i want to get in listview details of Android apps installed in the device.
i can get some of the data i want inside the DDMS with the following code:
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));
}
i get irrelevant info in my activity ("ApplicationInfi{41d67898 android}")
from the ApplicationInfo when using:
setListAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1,packages);
Do you know what i need to replace with 'packages' in that line to get:
Application name
package name
icon
thank you!
b70k3n.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en