Android : Hide another app luncher icon

on Thursday, March 26, 2015


I'm new to android programming. I'm developing an app with a button that when that button pressed i want to hide WhatsApp luncher icon. how can i do that? i know that i should use PakageManager but i have no idea how to use it. please help.after a long search i found this code but i have no idea how to use it:



ComponentName componentToDisable =new ComponentName("target package name",
"target launcher activity");
getPackageManager().setComponentEnabledSetting(
componentToDisable,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);

0 comments:

Post a Comment