Microsoft has invited Android developers to build or enhance apps for dual-screen devices, especially the company’s Surface Duo systems.
Following the September 22 introduction of Surface Duo 2, Microsoft issued a bulletin advising developers to use Jetpack Window Manager, currently in a beta stage, to adapt applications for dual-screen, foldable, and large-screen devices.
Jetpack Window Manager provides a standard API to work with foldable devices and includes two important classes:
DisplayFeature, which finds disruptions in the continuous flat-screen surface such as hinges or folds, and
FoldingFeature, which offers information about the state of the folding part of the device. The
FoldingFeature class offers device-specific information that enables a single code base to adapt to different dual-screen and foldable devices, including all Surface Duo models. Jetpack Window Manager APIs automatically provide the correct information for each device.
Surface Duo 2 features 5G support, a faster CPU, three rear-facing cameras, and larger and brighter screens than the previous Duo. The Surface Duo Design Kit has been updated to accommodate the slightly different screen sizes in the Duo 2 systems. Screen resolution changes are reflected in resource qualifiers used for loading, layouts, and resources.
Developers are advised to download the Surface 2 Android emulator. This provides a dual-screen experience for running Android 11, simulates the hinge in a “3D modes” view, and supports multi-touch and pen sensitivity. The emulator is available for Windows, Linux, and MacOS and works with Android Studio, Visual Studio, Visual Studio Code, and other IDEs used for Android development.
For Surface Duo 2 developers, Microsoft is providing samples showing how to use Jetpack Window Manager, guidance for incorporating Windows Manager with Jetpack Compose (including a
TwoPaneLayout control), and the Surface Laptop Studio developer tool.
Copyright © 2021 IDG Communications, Inc.