Google has recently announced that it is adding native support for Foldables devices in Android in preparation for upcoming device from Samsung. Google is specifically making three new changes to support this new range of devices.
In a foldable device, apps need to be transitioned from one screen to another automatically (eg. when folding / unfolding a foldable phone). During this transition, Android will now send a configuration change for the new layout (and possibly density in some cases) to apps so that apps can behave differently if required.
Android already supports multi-window mode. But, when an app is in multi-window but not focused, it is will be in paused state. Soon, Google will allow device manufacturers to keep all apps resumed when in multi-windows.
Developers can add the following meta-data in their app manifest to take advantage of this change:
<meta-data android:name=“android.allow_multiple_resumed_activities” android:value=“true” />
Starting with Android 8.0 (API level 26), If an activity supports multi-window mode and is running on a device with multiple displays, users can move the activity from one display to another.