Google have just released the second beta version of Android Q, which includes support for foldable devices. Both app continuity (the app adapts to the screen size on the fly when switching between folded and unfolded states) and multitasking (running two or ore apps at the same time in one screen) is now natively supported in Android Q.
According to Google, the phone ecosystem moves quickly toward foldable devices and new use-cases are opening up for developers to take advantage of these new screens. With Beta 2, developers can build for foldable devices through Android Q enhanced platform support, combined with a new foldable device emulator, available as an Android Virtual device in Android Studio 3.5.
On the platform side, Google has made a number of improvements, to help developers manage how their app is displayed on foldable and large screens. A foldable developer guide provides more detail. Foldable emulators are now available as a virtual device in Android Studio. The foldable virtual device is a reference phone that lets developers test with standard hardware configurations, behaviours, and states, as will be used by device manufacturers. Two foldable virtual devices are provided: a 7.3″ display (4.6″ folded) and a 8″ display (6.6″ folded). In each configuration, the emulator gives developers on-screen controls to trigger fold/unfold, change orientation, and quick actions.
See also: Is Android ready for foldable devices?