To hide/show the UI from with your app...
After a lot of searching on the internet, I managed to get the System Bar to hide and appear in a 4.2 device using the commands below
To Hide:
Runtime.getRuntime().exec("service call activity 42 s16 com.android.systemui");
Or use 79 instead of 42 for API less than 14.
To Show:
Runtime.getRuntime().exec("am startservice --user 0 -n com.android.systemui/.SystemUIService");
After a lot of searching on the internet, I managed to get the System Bar to hide and appear in a 4.2 device using the commands below
To Hide:
Runtime.getRuntime().exec("service call activity 42 s16 com.android.systemui");
Or use 79 instead of 42 for API less than 14.
To Show:
Runtime.getRuntime().exec("am startservice --user 0 -n com.android.systemui/.SystemUIService");