Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android how to programmatically hide launcher icon

my app is designed to only need to be run once. As such I want to hide the icon from the launcher after the first run, but without uninstalling the app.

I have seen similar applications - they can remove their own icons from the launcher app list. How can I achieve the same results? Thank you.

like image 308
user1047351 Avatar asked Nov 15 '11 10:11

user1047351


People also ask

Can you disguise an app on Android?

Open the App Drawer (the page that shows all your apps) by swiping up from the bottom of the screen. Tap the three dots in the top right corner, then select Settings. Select Hide Apps from the menu that appears. You'll see a list of all your app appear, go through and select the ones you want to hide.

How can I Hide apps without launcher?

On the home screen, long-tap an empty space and tap on Home screen settings. Scroll down and tap on Hide apps. Select the apps that you want to hide and tap on Apply. Tip: You can also use the Secure Folder in Samsung phones to hide the apps.


1 Answers

PackageManager p = getPackageManager(); p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); 

Note that the icon may not be gone until the next reboot.

like image 67
Kuffs Avatar answered Sep 23 '22 05:09

Kuffs