> For the complete documentation index, see [llms.txt](https://glitch9.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitch9.gitbook.io/docs/mobile-plugins-for-unity/status-and-navigation-bar/android-16-compatibility-guide.md).

# Android 16 Compatibility Guide

**Handling Screen Orientation and Resizable Activity Settings**

Starting from **Android 16 (API level 36)**, Android will **ignore certain restrictions** like fixed orientation and non-resizable windows on **large-screen devices** (foldables, tablets, etc.).\
To ensure your app works properly, you must update your Unity Player Settings.

***

#### ✅ Step 1: Allow Flexible Screen Orientation

**Default Orientation**

1. Go to **`Edit > Project Settings > Player`**
2. Select the **Android** tab
3. Open **Resolution and Presentation**
4. Set **Default Orientation** to:

```
✔ Auto Rotation
```

This prevents the system from locking the orientation to portrait or landscape, which may be ignored or cause layout issues on foldables.

***

#### ✅ Step 2: Enable Resizable Activity

**Resizable Window**

1. Go to **Player > Android > Other Settings**
2. Scroll down to **Configuration**
3. Make sure **Resizable Window** is:

```
✔ Enabled (checked)
```

This ensures that your app can run in split-screen and multi-window modes, which is required on Android 16+ large screens.

***

#### ⚠️ Why This Matters

If you leave the following settings:

```xml
<activity android:screenOrientation="portrait" android:resizeableActivity="false" />
```

Android 16 will **ignore them** on tablets and foldables, potentially breaking your layout.\
Unity may add these automatically unless you adjust your Player Settings as described.

***

#### 🔍 Optional: Custom Manifest (Advanced)

If you're overriding the manifest manually:

* Avoid hardcoding `android:screenOrientation`
* Set `resizeableActivity="true"`
* But remember: Unity Player Settings may overwrite your manifest unless you're using a custom mainTemplate.gradle and manifest override.

***

#### ✅ Summary

| Setting             | Location                                       | Recommended   |
| ------------------- | ---------------------------------------------- | ------------- |
| Default Orientation | Player > Android > Resolution and Presentation | Auto Rotation |
| Resizable Window    | Player > Android > Other Settings              | Enabled ✔     |

***

By following these steps, you ensure your Unity app is **ready for Android 16**, and works properly across all screen sizes and form factors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://glitch9.gitbook.io/docs/mobile-plugins-for-unity/status-and-navigation-bar/android-16-compatibility-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
