Skip to content

Instantly share code, notes, and snippets.

@hkurosawa
Created November 22, 2011 15:35
Show Gist options
  • Save hkurosawa/1385951 to your computer and use it in GitHub Desktop.
Save hkurosawa/1385951 to your computer and use it in GitHub Desktop.
Getting Launcheable Activity List on Android
public List<ResolveInfo> getLauncheableActivityList(PackageManager packageManager) {
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
return resolveInfoList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment