PDA

View Full Version : package and class



probbiethe1
03-21-2011, 11:03 PM
how do you find the package name and class name of an app? any help would be great thanks

alostpacket
03-21-2011, 11:32 PM
PackageManager pkgMgr = getPackageManager();

List< ApplicationInfo > list = pkgMgr.getInstalledApplications(0);

int len = list.size();

for (int index=0; index < len; index++)
{

ApplicationInfo content = list.get( index );

String pName = content.packageName;
String appLabel = pkgMgr.getApplicationLabel( content );
Drawable icon = pkgMgr.getApplicationIcon( content );
}

probbiethe1
03-22-2011, 05:03 PM
thanks for the reply