📜 ⬆️ ⬇️

Remove application icon from launcher

Translation of a note once found on the pages of the Internet.

Creating an application that does not appear in the list of applications being launched with the icon is easy. It is enough to place the following lines in the manifest file:

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>


The task of removing the application icon after installation is a bit more cunning.

')
You cannot independently prohibit the display of the icon, but you can prohibit one of the application components:

ComponentName componentToDisable = new ComponentName("ua.at.tsvetkov.myapp", "ua.at.tsvetkov.myapp.YouLauncherActivity");
getPackageManager().setComponentEnabledSetting(componentToDisable, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);


Limitations:

Source: https://habr.com/ru/post/123340/


All Articles