I'm an Android app developer. I want to kill the service running in the background, consuming resources. I tried
Runtime.getRuntime (). Exec ("sh" + packagename_to_stop)
But it did not work; Can someone help me? I appreciate your help.
I'm an Android app developer. I want to kill the service running in the background, consuming resources. I tried
Runtime.getRuntime (). Exec ("sh" + packagename_to_stop)
But it did not work; Can someone help me? I appreciate your help.
you need to gain root access first,
How can I get root permissions through the Android SDK?
Process root = Runtime.getRuntime().exec("su");
your app will have root access, then you can execute your commands as Root user.