0

I have used this code for hiding my app. But not able to install it again

hide.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                PackageManager manager=getPackageManager();
                ComponentName name=new ComponentName(MainActivity.this,MainActivity.class);
                manager.setComponentEnabledSetting(name,PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                        PackageManager.DONT_KILL_APP);
                Toast.makeText(MainActivity.this,"App Hidden",Toast.LENGTH_LONG).show();
            }
        });

Please help!

1 Answers1

0

you should uninstall the app and install it again because the icon will be disappeared.

you can check this link for more information Android hide/unhide app icon programmatically

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 21 '21 at 13:12
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/29882602) – MiguelHincapieC Sep 21 '21 at 18:20