java - How to kill all active processes from Android phone with code in my app? -


hi

how kill active processes android phone code in app? read couple of articles how kill running applications in android? , tried code:

 list<applicationinfo> packages;      packagemanager pm;     pm = getpackagemanager();     //get list of installed apps.     packages = pm.getinstalledapplications(0);      activitymanager mactivitymanager = (activitymanager)context.getsystemservice(context.activity_service);      log.d("packages" , string.valueof(packages));      (applicationinfo packageinfo : packages) {          mactivitymanager.killbackgroundprocesses(packageinfo.packagename);          log.d("cleaned" , string.valueof(packageinfo.packagename));      } 

logcat show me active processes, no of them have closed/nothing happens.

yes, have included in manifest:

  <uses-permission android:name="android.permission.kill_background_processes" /> 

i there i'm missing?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -