Home > Tricks & Tips > Query all installed Launcher Applications

Query all installed Launcher Applications

The tip for making this happen is that all launchers register these two categories in Manifest



and this is my snippet to query ’em all.

	public static ArrayList<ApplicationInfo> getAllLaunchers(Context context) {
		// create new intent
		final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
		// all launchers register these two categories

		// query normally
		final ArrayList<ResolveInfo> pkgAppsList = (ArrayList<ResolveInfo>)
				context.getPackageManager().queryIntentActivities( mainIntent, 0);

		// you can return 'pkgAppsList'
		// anyway, I need the following information,
		// so I just query what I need
		ArrayList<ApplicationInfo> listAppInfo = new ArrayList<ApplicationInfo>();
		for(ResolveInfo info: pkgAppsList) {

		// return
		return listAppInfo;

There you go, gotta do something with it.
Enjoy and have fun!

Pete Houston

Categories: Tricks & Tips Tags: , , , ,
  1. Hitesh Dhamshaniya
    August 6, 2012 at 5:09 pm

    very help full tutorial, thanks for everything,
    I have small query, like
    how can I make my launcher as default launcher ?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: