-1

I have listed installed applications.I want to hide the selected app in my mobile.

Some application are used launcher to hide the application from the launcher.I want to hide the application from the mobile.

Any chances to hide the application from mobile without using launcher?

prash
  • 1
  • 1

1 Answers1

0

Use this to hide application icon from list of application.

Hide app's icon using below code:

PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); // activity which is first time open in manifiest file which is declare as <category android:name="android.intent.category.LAUNCHER" />
p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

Here is how to bring back the app's icon.

PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class);
p.setComponentEnabledSetting(componentName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
mehul chauhan
  • 1,792
  • 11
  • 26