List of Applications

Quickly share your Android Code Snippets here...

List of Applications

Postby baca » Sun Dec 04, 2011 8:10 pm

Code: Select all
PackageManager pm = getPackageManager();               
List<ApplicationInfo> list = pm.getInstalledApplications(0);
               
for (int i=0; i< list.size(); i++)
{
    ApplicationInfo appInfo = list.get(i);
    String packageName = appInfo.packageName;
    String appLabel = (String) pm.getApplicationLabel(appInfo);
    Drawable icon = pm.getApplicationIcon(appInfo);
}
User avatar
baca
Freshman
Freshman
 
Posts: 6
Joined: Fri Oct 21, 2011 11:06 pm
Location: Poland

Top

Re: List of Applications

Postby christusvalerian » Thu Feb 28, 2013 7:37 am

Here is another code to retrieve the list of applications
*********************CODE**********************************

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

Regards
Android developer
Trinay Technology Solutions
www.trinaytech.com
5705750475
christusvalerian
Developer
Developer
 
Posts: 28
Joined: Sat Jun 18, 2011 8:03 am

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 3 guests