Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

hide app icon in android 10

dear users!
i want to hide app icon in android 10.
This code works fine until Android 9.
ComponentName componentToDisable = new ComponentName(
this,
com.android.test.MainActivity.class);


getPackageManager().setComponentEnabledSetting(
componentToDisable,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP
);

Intent MainIntent = new Intent(Intent.ACTION_MAIN, null);
MainIntent.addCategory(Intent.CATEGORY_LAUNCHER);


i want source code for it

1 Reply
Highlighted
Community Manager
Message 2 of 2

Re: hide app icon in android 10

We are happy you are here! You are more likely to get a useful response if you are explicit about what your project entails, giving a few more details might help someone give you a nudge in the right directions.


I hope this helps,
Andrea

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!