Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to hide the system bar in Android 3.0? It's an internal device and I'm managing navigation

In Android 2.3 and below, you could make an application full screen, and then "hijack" the menu/back/search buttons by just returning false onKeyDown()... and registering the app as a default home launcher application, that way, there's no way to exit the application.

In Android 3.0 (Honeycomb) the navigation buttons (System Bar) is always present, I'd like to hide it. Is it possible?

FYI, I am not publishing this application on the Android Market. This is an internal application for devices that are going to be used internally, I need to secure the device.

like image 236
velazcod Avatar asked Feb 24 '11 20:02

velazcod


People also ask

How do I get rid of the navigation bar on Android?

Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.

What is a navigation bar in Android?

The Navigation bar is the menu that appears on the bottom of your screen - it's the foundation of navigating your phone.

How do I hide the navigation bar in Android 12?

Step 10: search “android:dimen/navigation_bar_frame_height” in the search bar and set it to 0. Hit apply and save it and ensure the tick mark. And your Navigation gesture pill will disappear and you will have an uninterrupted Android experience tailored to perfection just by you.


1 Answers

Since this is not possible to do using a public API, I have found a way to do it in a very "hack-ish" way that requires a rooted device.

Update: as user864555 pointed below, this is another solution

$ adb remount $ adb shell mv /system/app/SystemUI.odex /system/app/SystemUI.odexold $ adb shell mv /system/app/SystemUI.apk /system/app/SystemUI.apkold $ adb reboot 

"That code disable the app SystemUI which is the actually menu bar. Which that modification, you will also gain the space of that system bar. But make sure to have a back button or something to exit."

That works great as well. Please vote for his answer. I will try to keep this one updated as much as I can.


Update: Here's a third method. A way to do it programmatically or using the command line. Found here: http://android.serverbox.ch/?p=306

This method requires root access, but you don't need to change the LCD Density, keeping the same as the original, and you can get the UI nav bar back really quick and easy without having to reboot everytime.

The blog post also shows how to implement it on your Android application, remember it requires root, and it might not be a great idea to do so unless your application is running on a kiosk or your own device, please do not implement this method on an app that's published in the Android market or anywhere public.

To stop/remove/disable the system bar (need to be su before issuing this command):

$ service call activity 79 s16 com.android.systemui 

To restore the system bar just simply issue this command:

$ am startservice -n com.android.systemui/.SystemUIService 

It's that easy. Hopefully ICS gets released soon along with the source code so that anyone can build Android for our Kiosk tablets.

like image 173
velazcod Avatar answered Oct 07 '22 20:10

velazcod