How to hide bottom bar via adb shell command programmatically with Android 4.2+
To hide the bottom panel from the tablet, I am trying to run this command with the code
try
{
Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 42 s16 com.android.systemui"});
proc.waitFor();
}
catch(Exception ex)
{
Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();
}
Then it throws an exception
java.io.IOException: An error occurred while executing exec (). Command: [su, -c, service call 42 s16 com.android.systemui] Working directory: null Environment: null
But when I execute a command via adb like "adb shell call service action 42 s16 com.android.systemui" works fine. I mean, he quickly hid the bottom plan. Can anyone help with this issue?
+3
source to share
No one has answered this question yet
Check out similar questions: