# [PLEASE HELP] Toggle Navigation Bar (Preferably in app)



## Supermandroid (Jun 19, 2011)

I work for a company who sells TF101 tablets preloaded with children software for prek students in school systems. Our biggest problem is that children are always given access to the status bar at the bottom and they are getting out of apps and into areas they shouldn't on the tablets. I need a way to remove the navigation bar from the screen while they are in our application. We do have a way to exit the application within the teachers menu, so I do not intend on locking people in my app, we are just getting complaints that the children are leaving the app and getting into other areas on the tablet. Ideally, I would like the navigation bar to be removed completely when the app opens and it will reappear once the app is closed.
I know that force closing the system UI from settings will remove the navigation bar but I am not sure how to get it back without a reboot. I am wondering if there is a way to add a few lines of code to my application so this happens automatically and then restored once the application is exited. Can anyone help or point me in the right direction?


----------



## K900 (Sep 6, 2011)

AOKP has an option to hide the navbar completely.


----------



## Supermandroid (Jun 19, 2011)

K900 said:


> AOKP has an option to hide the navbar completely.


Yes they do, that is what I am running on my GNex but I need a solution for a stock ROM as it is going to early childhood classrooms. I like the pink unicorn but it is not the most professional image  
I could always cherry pick that feature and merge it into AOSP and build my own rom but when I tried this, it failed. It might be because I cherry picked the wrong code but I am not sure. Like I said, I would ultimately like this added to my application itself as opposed to building my own ROM.


----------



## K900 (Sep 6, 2011)

Supermandroid said:


> Yes they do, that is what I am running on my GNex but I need a solution for a stock ROM as it is going to early childhood classrooms. I like the pink unicorn but it is not the most professional image
> I could always cherry pick that feature and merge it into AOSP and build my own rom but when I tried this, it failed. It might be because I cherry picked the wrong code but I am not sure. Like I said, I would ultimately like this added to my application itself as opposed to building my own ROM.


You can just replace or disable the bootanimation. Disabling the navbar completely needs some code in SystemUI that depends on some other code in SystemUI and framework, so I don't think it'll be that easy to port to AOSP.


----------



## Supermandroid (Jun 19, 2011)

K900 said:


> You can just replace or disable the bootanimation. Disabling the navbar completely needs some code in SystemUI that depends on some other code in SystemUI and framework, so I don't think it'll be that easy to port to AOSP.


That is what I am looking for. Is it possible to use apkmultitool for this? I know it will not be easy to edit framework and systemUI to achieve this but I want to learn how to do it. The ROM must be as stock as possible with the exception of hiding the nav bar. I know I can disable the boot animation but that does not remove options for ROM Control, theme settings, extended developer options and rom name in settings. Dont get me wrong, I love AOKP and have it on all my devices but for customer devices, I dont think it is a good option.


----------



## K900 (Sep 6, 2011)

Supermandroid said:


> That is what I am looking for. Is it possible to use apkmultitool for this? I know it will not be easy to edit framework and systemUI to achieve this but I want to learn how to do it. The ROM must be as stock as possible with the exception of hiding the nav bar. I know I can disable the boot animation but that does not remove options for ROM Control, theme settings, extended developer options and rom name in settings. Dont get me wrong, I love AOKP and have it on all my devices but for customer devices, I dont think it is a good option.


I'll try to build something for you.


----------



## K900 (Sep 6, 2011)

Is this still relevant? I don't have much free time ATM, but I'll try to do something by the end of the next week.


----------

