How to change process priority in Android? I have found process description and description of it’s priorities in android docs
process and thread description
but I have found nothing on changing process priority by some method.
ps: I need this to test only some feature of application which is connected with process priority and it won’t be used in program.
The only way I see is to try to change the priority via importance field, but it’s a bad idea I guess.
You can’t, except perhaps on a rooted device, and then only temporarily. Process priority is managed by the OS. If your app is in the foreground, it will run with foreground priority. If your app is not in the foreground, it will not run with foreground priority.
Then test with a process that is in the foreground versus one that is not.
Changing that number is unlikely to have an effect.
RunningAppProcessInfois an output structure, not a means by which to change anything reported via that structure.