I am attempting to have the nav bar auto hide when my app hasn't been touched for a few moments. For example, when I look at a photo I can click it and that makes the photo app hide all the bars until you touch it again. I would like that behaviour. SimCity BuiltIt has similar behaviour but you have to drag the bar back on (I wouldn't mind that behaviour). I am struggling to even know where to start.
I found this http://developer.android.com/training/system-ui/navigation.html which explains how to do it but that's using Java and I am using c++/NDK and I can't find any similar functions and Google is less than helpful in this regards.
I checked through some of the Android headers and came across this:
ACONFIGURATION_NAVHIDDEN_ANY = 0x0000,
ACONFIGURATION_NAVHIDDEN_NO = 0x0001,
ACONFIGURATION_NAVHIDDEN_YES = 0x0002,
/**
* Set the current nav hidden in the configuration.
*/
void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden);
I trief setting it to hidden but I saw no change. It doesn't help that I don't get access to the config until after the app is created (it is passed in to main). I can't see anything in the manifest options that mimics the behaviour either.
Is there a solution to this?
My app renders MandelbrotSet images so I want to be able to support screenshots (which it does automatically) but it has the nav bar in them. If I could auto crop or override the screenshot behaviour that would also work. I think it would be possible to render to texture and save as an image but I ideally want to avoid anything that means my App needs permissions.
I've attached a screenshot to show what I mean.
Thanks