Samsung Galaxy Fold (foldable phone) support

Issue when running games on Samsung Galaxy Fold phone

  • When switching from the cover display (when folded) to the main display (when unfolded) screen

    • The game may be driven with the top and bottom cut off without using the entire screen

      • Affected by many Unity games

    • Loss of running state and activity restarts

      • Occurs when configChanges is not set in an activity other than the Unity main activity

Solutions

  • Explicitly set ‘resiableActivity’ to ‘true’ in Application settings as shown below

    • If set as below, it is driven to use the full screen when switching displays.

      <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" > <application android:resizeableActivity="true"> ... ... </application> </manifest>
  • Add ‘configChanges’ setting to the activity you use

    • Set to use the ongoing process as it is without creating a new activity when switching the display

      • android:configChanges="orientation|screenSize|keyboard|screenLayout|screenSize|smallestScreenSize"

    • In the case of Unity, these items are already set in UnityPlayerActivity, so you only need to set them to Activities that are missing the settings below.

      <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" > <application android:resizeableActivity="true"> <!-- Example START --> <activity android:name="com.kakaogame.KGAuthActivity" android:configChanges="orientation|screenSize|keyboard|screenLayout|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <!-- Example END--> </application> </manifest>