Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the package name of current launcher in android?

Tags:

android

I want to get the package name of the current launcher that I have currently installed. I tried using the link http://stackoverflow.com/questions/10344824/how-can-i-get-the-package-name-of-the-current-launcher-in-android-2-3-and-above

but it gives the result as "android". I want the complete launcher name .

List Of Launchers

I want the list of launchers installed and the current launcher selected

Thanks in advance

like image 772
Nishant Virmani Avatar asked Jul 31 '14 09:07

Nishant Virmani


People also ask

How do I know what my current launcher is?

First, you need to navigate to Settings > Apps > All. Scroll down and look for your current application launcher.

What is my app launcher?

An app launcher replaces the stock user interface for organizing the home screen and app icons predominantly in the Android world; however, they are also available for jailbroken iPhones (see iPhone jailbreaking and Cydia). See Launchpad and app drawer.

What is Android system launcher?

A launcher is to your Android phone as a desktop is to your computer—launchers provide the background interface on your phone and help you organize everything that you need quick and easy access to.


1 Answers

you can get current launcher package name using below code:

PackageManager localPackageManager = getPackageManager();
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
String str = localPackageManager
        .resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
        .activityInfo
        .packageName;
Log.e("Current launcher Package Name:", str);
like image 148
Ravi Kant Avatar answered Oct 16 '22 04:10

Ravi Kant