Original address http://android.serverbox.ch /? P = 306
Without the system bar it is almost impossible to control your honeycomb tablet. Since no hardware control buttons are enforced for the tablet the system bar is the only way to control your slate.
However, if your application inreceivates a way of removing the bar and on leaving
RestartingThe bar there is no reason why not to support such a feature.
The easy part: restarting the bar
Restarting the bar is pretty simple, drop to a shell and start the service using the "Am" command:
# am startservice -n com.android.systemui/.SystemUIService
The difficult part is to shut it permanently down. One way is to navigate to the application settings and shut it down with the "force close" button. However, attempting to kill the process
# killall com.android.systemui
Will remove the bar for a few seconds. sadly, it will return eventually since in the applications manifest file the "persistent" parameter enforces the system to restart the service unless it is shut down properly by the "system" user itself.
The following magic line will shut down the bar permanently if executed as root:
# service call activity 79 s16 com.android.systemui
What it does is sending the activitymanager a Shutdown signal for the systemui service.
This method was tested on an Iconia a500 with Android 3.01; although it shoshould work with other devices as well (since the source code that we use is common ).
Putting it together
To remove the system bar from your application create and execute a process:
Process proc = Runtime.getRuntime().exec(new String[]{"su","-c","service call activity 79 s16 com.android.systemui"});
proc.waitFor();
To restore the system bar use the following code snippet:
Process proc = Runtime.getRuntime().exec(new String[]{"am","startservice","-n","com.android.systemui/.SystemUIService"});
proc.waitFor();