Home > Mobile >  Android, the first in a software for all users to install applications, and then click hide away aft
Android, the first in a software for all users to install applications, and then click hide away aft

Time:09-24

I want to seek advice, all is me in the heart of the Android users to install the software to get out and placed in a ListView, through to the Item in the ListView set the click event, and then I click on the application in the mobile phone on the desktop icon to hide, and then click again to display, how to write code? Can seek along while also didn't find useful code, seek help from god

CodePudding user response:

You need to use the system signature https://blog.csdn.net/xk7298/article/details/93332419
 
PackageManager p=getPackageManager ();

P. etApplicationEnabledSetting (" packages ", PackageManager.COM PONENT_ENABLED_STATE_DISABLED, PackageManager DONT_KILL_APP);

CodePudding user response:

 

PackageManager p=getPackageManager ();
P. etApplicationEnabledSetting (" packages ", PackageManager.COM PONENT_ENABLED_STATE_DISABLED, PackageManager DONT_KILL_APP);


 & lt; USES - the permission of the android: name="android. Permission. CHANGE_COMPONENT_ENABLED_STATE"/& gt; 

The permissions only open to the system, so you need to use the system signature at https://blog.csdn.net/xk7298/article/details/93332419