# Manage the visibility and behavior of Android system bars

> Explains how to configure system bars visibility and behavior for your Android application. Also includes information on the methods that detect any changes in the system bars visibility and behavior.

Unity allows you to control the visibility of Android system bars and configure how they respond to gestures such as swiping from the screen edges. The Android system bar visibility determines how your application utilizes the available screen space to display its content.

The Android system bars are Android system UI elements that generate window insets when visible. Window insets define the screen area these UI elements occupy, restricting your application to use the remaining available screen space. The Android system bars include:

* **Status bar**: Appears at the top of the screen and contains information such as time, battery, and notifications.
* **Navigation bar**: Appears at the bottom of the screen and contains navigation elements to move to the previous, home, or recent applications.

You can control the Android system bars through the [Insets](/engine/6000.6/manual/platform-specific/android/getting-started/class-player-settings.md#insets) section in the Android Player settings.

* When you make the Android system bars visible, the application content is restricted to the area available on the device screen that excludes the visible system bars or physical display cutouts.
* When you hide the Android system bars, the application content utilizes the full available screen space. This helps create a seamless full-screen user experience. Additionally, hiding the system bars reduces the risk of users exiting the application by mistake.

> **Note:**
>
> On Android versions earlier than 15, the [Render Outside Safe Area](/engine/6000.6/manual/platform-specific/android/getting-started/class-player-settings.md#Resolution) Player setting determines whether the full available screen space includes the area around physical display cutouts. On Android 15 and later, the Android operating system allows application content to extend over the display cutouts. However, in this case the application content cannot use the screen area Android system bars occupy when visible.

## Configure Android system bars visibility and behavior

To configure Android system bars, follow these steps:

1. In the Unity Editor, go to **Edit** > Editor > **Player** > **Android**.
2. In the **Resolution and Presentation** settings, locate the **Insets** section.
3. Disable the **Status Bars** and **Navigation Bars** checkboxes as required to hide the corresponding Android system bars.
4. Select the required option in the **System Bars Behavior** dropdown.

Your application now hides the selected Android system bars and uses the available screen space.

The selected [**System Bars Behavior**](/engine/6000.6/manual/platform-specific/android/getting-started/class-player-settings.md#insets) option controls how Android system bars respond to system gestures. The available dropdown options allow you display the system bars temporarily in a transparent format or keep displaying the system bars until they're manually hidden again using [AndroidWindowInsets.Hide](/engine/6000.6/script-reference/unityengine/android/androidwindowinsets/hide.md).

> **Note:**
>
> The **Hide Navigation Bar** Player setting is obsolete in new projects created using Unity versions 6000.5 and later. For existing projects with this setting enabled, the navigation bar remains disabled by default.

## Detect Android system bars visibility and behavior changes

Use the [AndroidApplication](/engine/6000.6/script-reference/unityengine/android/androidapplication.md) class methods to access Android system bars information.

* The [currentWindowInsets](/engine/6000.6/script-reference/unityengine/android/androidapplication/currentwindowinsets.md) method provides current Android system bars visibility and behavior status.
* The [onWindowInsetsChanged](/engine/6000.6/script-reference/unityengine/android/androidapplication/onwindowinsetschanged.md) method allows you to detect and handle any changes in the visibility and behavior at runtime.

> **Note:**
>
> The [onWindowInsetsChanged](/engine/6000.6/script-reference/unityengine/android/androidapplication/onwindowinsetschanged.md) callback and the **System Bars Behavior** are supported on Android 11 (API 30) or later versions. On older devices, you need to detect changes in the insets manually. These devices always return `undefined` when detecting the current Android system bar behavior.

## Additional resources

* [About window insets](https://developer.android.com/develop/ui/compose/system/insets)
* [Hide system bars for immersive mode](https://developer.android.com/develop/ui/views/layout/immersive)
