Search Unity

Samsung's "Full Mode" and 18.5:9 aspect ratio

Discussion in 'Android' started by Sempiternal, Dec 10, 2017.

  1. Sempiternal

    Sempiternal

    Joined:
    Jun 18, 2014
    Posts:
    114
    Hi all,

    I recently purchased a Samsung Note 8 and noticed this optional "Full Mode" that Samsung implemented for games. It looks like the S8/S8+ has this feature as well. So far, I have my game automatically adjust to 18.5/9 aspect ratio based on device model, but I can't seem to get the full mode enabled before first launch.

    My question is, since I have downloaded apps that have full mode enabled automatically, how do I go about doing this in Unity? I would like full mode to be enabled before users even launch the game. I am currently running Unity 5.6, and I have tried messing with the Android manifest file to no avail based on this link:

    https://stackoverflow.com/questions/43694526/samsung-galaxy-s8-full-screen-mode

    Any help would be appreciated!

    Thanks,
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
  3. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    143
    I can see the same problem on Galaxy s9+. By default the app is in windowed mode, but I can switch to fullscreen. The settings app still has "Can work with troubles in fullscreen mode (or is not adapted for fullscreen)" text near the switcher.
    I tried aspect ratio to Custom up to 2.1 and 1.86, so it should be able to support Samsung Galaxy S9, Galaxy S9+ 18.5:9 Aspect Ratio.
    Can someone from Unity help me to fix this problem?
    P.S. Tested in Unity 2018.1.0 f2 and 2018.2.11 f1
     
    Last edited: Oct 17, 2018
    stalhandske likes this.
  4. mohammadkhatib

    mohammadkhatib

    Joined:
    Jul 14, 2017
    Posts:
    3

    I just found a solution, if you change in manifist inside unity it will be reverted back, therefore export your project into gradle open it with android studio and add this tag inside <application> tag:


    <meta-data android:name="android.max_aspect" android:value="2.1" />
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    Is this needed? Doesn't setting "Native aspect ratio" in player settings make it work for really wide aspects?
     
  6. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    From android docs https://developer.android.com/about/versions/oreo/android-8.0
    That's why if the selected target api level is 26 or higher and the "Native aspect ratio" is selected in the player settings, we don't add any aspect ratio related attributes to the manifest (we should not remove them if they are set in the custom manifest though). You can always force that attribute to be added to the manifest by selecting "Custom" aspect ratio in the player settings and specifying the desired value.