Created
December 31, 2014 17:20
-
-
Save d4rken/d4bf8c3bdbd3341cda84 to your computer and use it in GitHub Desktop.
Hiding an app shortcut by disabling it's Activity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void hideIcon() { | |
PackageManager p = getPackageManager(); | |
p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); | |
Toast.makeText(getApplicationContext(), "Icon hidden (may need reboot)", Toast.LENGTH_SHORT).show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment