In Android 7.0 and later, users can have multiple apps simultaneously displayed on their device screen with the new platform feature, multi-window. In addition to the default implementation of multi-window, Android also supports a few varieties of multi-window:
To implement the multi-window feature, device manufacturers set a flag in the config file on their devices to enable or disable multi-window support.
Multi-window support is enabled by default in Android 7.0 and later. To disable it, set
the config_supportsMultiWindow
flag to false in the config.xml
file.
For devices that declare ActivityManager.isLowRam()
, multi-window
is disabled regardless of the value of config_supportsMultiWindow
flag.
The default multi-window experience is split-screen mode, where the System UI is divided directly down the middle of the device in portrait or landscape. Users can resize the window by dragging the dividing line side-to-side or top-to-bottom, depending on the device orientation.
Then device manufacturers can choose if they want to enable freeform or PIP.
After enabling standard multi-window mode with the flag
config_supportsMultiWindow
, device manufacturers can optionally
allow freeform windowing. This mode is most useful for manufacturers of larger
devices, like tablets.
To support freeform mode, enable the
PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT system feature in /android/frameworks/base/core/java/android/content/pm/PackageManager.java
and set config_freeformWindowManagement
to true in config.xml.
<bool name="config_freeformWindowManagement">true</bool>
After enabling standard multi-window mode with the flag
config_supportsMultiWindow
, device manufacturers can support picture-in-picture
to allow users to continue watching video while browsing other activities.
While this features is primarily targeted at Android Television devices, other
device form factors may support this feature.
To support PIP, enable the PackageManager#FEATURE_PICTURE_IN_PICTURE system feature in /android/frameworks/base/core/java/android/content/pm/PackageManager.java.
Support all standard System UIs according to https://developer.android.com/guide/topics/ui/multi-window.html#testing
To support multi-window mode for preloaded apps, consult the Android developer documentation.
To validate their implementation of multi-window, device manufacturers should run CTS tests and follow the testing instructions for multi-window.