There are many articles written about the app hide icon. I wrote down my feelings.
The most seen situation is: Androidmanifest.xml file in the Intent-filter of the entry activity to remove <category android:name= " Android.intent.category.LAUNCHER "/> or LAUNCHER changed to default, so it can play the function of hiding the icon, but the program is not open, unable to run.
There is also a way to hide the icons in the following ways:
1Packagemanager Packagemanager =Getpackagemanager ();2ComponentName componentname =NewComponentName ( This, StartActivity.class);3 intres =packagemanager.getcomponentenabledsetting (componentname);4 if(res = =Packagemanager.component_enabled_state_default5|| res = =packagemanager.component_enabled_state_enabled) {6 //Hide App icon7 packagemanager.setcomponentenabledsetting (componentname, packagemanager.component_enabled_state_disabled, 8 Packagemanager.dont_kill_app);9}Else {Ten //Show app icon One packagemanager.setcomponentenabledsetting (componentname, Packagemanager.component_enabled_state_default, A Packagemanager.dont_kill_app); -}
But I didn't work in this way. I use the following method:
<activityandroid:name= "tv.huan.xmpp.activity.MessageActivity" android:configchanges= "orientation| Keyboardhidden "android:screenorientation=" Portrait "><intent-filter><action android:name=" Android.intent.action.MAIN "/><data android:host=" authactivity "android:scheme=" Com.xtt.www "/>< Category android:name= "Android.intent.category.LAUNCHER"/></intent-filter></activity>
The main thing is to add this sentence: <data android:host= "authactivity" android:scheme= "com.xtt.www"/> In this way we declare the app's entry activity to be activated by the intent that receives the hermit, so that the icon will not be displayed naturally. However, it is important to note that scheme is case-sensitive, so that the entry activity we specify can respond to a specific Intent that is URI com.android.example://authactivity.
App icon Hidden