0

I'm here because I don't know where to go anymore to get some idea of the following:

In my android code I have this:

private void deleteLabelIcon(Context context){
ComponentName CTD = new ComponentName(context, mainActivity.class);
context.getPackageManager().setComponentEnabledSetting(CTD, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
        }

With this only what I do in versions 11 and 10 or 12 of android is that the application cannot be uninstalled in configuration/application or it does not let you enter the application to force stop or uninstall the application.

But if I can drag it or give the application in the submenu to uninstall.

What I want to do is hide the application or that it cannot be uninstalled under any option.

I have seen that this code that I have from what I have read in versions prior to 10 seems that it hides the application but in 10 onwards it does not hide.

I would need help on how I have to proceed or ideas on how I can hide the application or something like that.

Dr Mido
  • 2,414
  • 4
  • 32
  • 72
dsx
  • 3
  • 3
  • "What I want to do is hide the application or that it cannot be uninstalled under any option" -- hopefully, that is not possible. – CommonsWare Oct 02 '22 at 11:04
  • I only get that from setup/applications there it doesn't let you enter to uninstall, and I also get that when you click on the application you don't get the force stop or unistall. The only thing is that if you drag the app to the top if you can uninstall it or by double clicking it lets you uninstall the application. I only need to hide the icon of the application or make it hidden – dsx Oct 02 '22 at 11:22

0 Answers0