Status bar behaviour on Android

  1. Make your main app window fullscreen with setFullScreen (true);
  2. Set your main app window in kiosk mode with Desktop::getInstance().setKioskModeComponent (this, false);
1 Like

Thank you!

Doesn’t seem to work right now… at least on Android 8.1 emulator in Android Studio (tablet coming soon!). Kiosk mode doesn’t seem to make a difference - I still have the top status stuff, and a thick bar with the name of the app.

Anything else to set?

Thanks!

Update - got a tablet. It does clear the carrier stuff, and bottom nav bar, but there’s still a big app name bar at the top.

Is this something I can clear? Do I need to change the window type I’m creating or something (currently a DocumentWindow).

Thanks,

As I struggled with the same thing, I tried a variety of things over time, and have not yet gone back and whittled things down to the minimum, but here is my MainWindow ctor:

LiveControllerApplication::MainWindow::MainWindow (String name, ValueTree appProperties, ValueTree runtimeProperties, AudioDeviceManager* adm, CueAudioServer* cas)
    : DocumentWindow (name, Desktop::getInstance().getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId), DocumentWindow::allButtons)
{
    setUsingNativeTitleBar (true);
#if JUCE_ANDROID
    Desktop::getInstance().setOrientationsEnabled (Desktop::allOrientations);
#endif

#if ! JUCE_MAC && ! JUCE_IOS && ! JUCE_ANDROID
    setMenuBar (LiveControllerApplication::getApp().getMenuModel());
#endif

    setContentOwned (new MainComponent (appProperties, runtimeProperties, adm, cas, mb), true);

#if JUCE_IOS || JUCE_ANDROID
    setFullScreen (true);
#if JUCE_IOS
    setBounds (Desktop::getInstance().getDisplays().getMainDisplay().totalArea);
    Desktop::getInstance().setKioskModeComponent (this, false);
#endif
#else
    setResizable (true, true);
#endif
    setVisible (true);
}

Thanks!

Hmm. Almost identical, except on Android you aren’t going Kiosk. I tried that - carrier and nav areas stay on, but status bar or title bar thing is still there.

Maybe anything you changed in the project? Permissions?

I’m running down these tips right now:

Good call… I forget where I picked this up:

2 Likes

Yes, that got it, thanks!

1 Like