Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity should disable multi window support on Android

Discussion in 'Android' started by PZ2100, Jun 25, 2020.

  1. PZ2100

    PZ2100

    Joined:
    May 27, 2017
    Posts:
    21
    Recently I've been submitting some games built with Unity to Samsung Galaxy Store. Apparently, newer Samsung tablets get this feature called "multi window" where a panel (e.g. with a calendar in it) would slide from the right or from the bottom, cover about 30% of the screen and also show some overlays over the top edge of the screen.

    I wouldn't care, but it seems that the review team of Samsung Galaxy Store tries to make sure that apps react properly to this Samsung-unique feature. They apply it inconsistently though: about 50% of my submissions get rejected because the game gets all messed up when it's suddenly resized from landscape orientation to essentially a 3:4 portrait orientation (while in multi window mode). More importantly though, Samsung doesn't let the game through to the store because of the overlays the OS is forcing at the top - something that neither the game nor (I guess) even Unity can control.

    In my opinion, what Samsung does is misguided because they don't know how games are designed. On mobile, games shouldn't be able to switch to 3:4 portrait orientation if their UI is designed for landscape orientation. If we as game devs allow only landscape orientation in Unity build settings for Android, it means that we want to be able to design the UI and everything else with the assumption that the game is played in landscape orientation. Otherwise the setting "screen orientation" doesn't make sense and should be removed from Unity (or Android manifest files, and Android in general) entirely, and all apps have to work in whatever screen ratio or orientation, like a freely resizable window in Windows OS.

    The good thing is, an app on Android can declare that it doesn't support multi-screen, and the user won't be able to slide out a calendar from the side while the app is running. I think that ALL Unity games must have that declaration in the Android manifest. That's not even as much because of the sudden screen resizing (and essentially an unsolicited screen orientation change) but more because of the overlays at the top which Samsung itself adds and then disallows the apps to the store because of it.

    Here is how multi window is allowed/disallowed:

    https://developer.android.com/guide/topics/ui/multi-window

    In Android manifest file which Unity generates, in <activity> tag, please add
    android:resizeableActivity="false" and
    android:supportsPictureInPicture="false"
     
  2. oliverwigren

    oliverwigren

    Joined:
    Jun 10, 2020
    Posts:
    5
    How do you find the Unity generated Android Manifest? (On unity 2020.3.4f)
     
  3. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    54
    You can enable/disable multi-window support in the Android build settings. The setting is called "resizable window".

    upload_2022-3-20_2-29-52.png
     
    Moonjump likes this.