问题
as the title already says, I want to execute a linux comand with a very low priority so as to not disturb my app and keep it running smooth.
I currently use:
Runtime.getRuntime().exec
Is there another way to achieve this with setting the priority ?
回答1:
You can change the process priority on rooted devices with renice
provided by the Busybox binary if you know the PID of the process you want to give less priority to.
Just run the command using the exec function of Runtime just like you are.
来源:https://stackoverflow.com/questions/9790069/how-to-execute-linux-command-on-android-java-with-low-priority