Here you can find the source of getApplicationInfos(Context context)
public static List<ApplicationInfo> getApplicationInfos(Context context)
//package com.java2s; import java.util.List; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; public class Main { public static List<ApplicationInfo> getApplicationInfos(Context context) { PackageManager pManager = context.getApplicationContext() .getPackageManager();//from w w w . j av a2 s . co m return pManager .getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES); } }