android - How to hide/unhide other applications icon? -


I'm developing a small application that means AppHider also includes a list of user-installed applications and their launcher names. The name of the package

Now I want to hide / show the application, I was using this code below but it is not working, so nobody can tell, I How to hide / hide application's app icons

To hide the app icon

  PackageManager p = getPackageManager (); Component name component name = new element name (SingleApactivity.This, application); // Activity, which opens in the largest file for the first time, which is & lt; Category is declared as android: name = "android.intent.category.LAUNCHER" /> P.setComponentEnabledSetting (parameter name, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);   

To turn off the app icon

  PackageManager p = getPackageManager (); Component name component name = new element name (SingleApactivity.This, application); P.setComponentEnabledSetting (component name, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);    

You must add a package name instead of the classname. See the code below

Change your

  element component = new component name (SingleApactivity.a, application); With   

  elementname elementname = new component name ("apppackname", "apppackgenemm. Launcher classname");   

This is ...

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -