The Microsoft Surface Duo and Samsung Galaxy Z Fold 2 have been compared and contrasted but, curiously, Microsoft doesn’t think they’re that different, at least not from an app development point of view. That’s actually a good thing because that means that Microsoft’s own app development tools could be used for both devices. That seems to be the spiel it is making with its new experimental Web APIs that it says will help web app developers target foldable phones, whether they have one, two, or even three screens.
The term “foldable” has so far been reserved for the likes of the Galaxy Z Fold 2 and Motorola Razr that have actual foldable screens. Microsoft, however, seems to be appropriating the word for its own Surface Duo, simply saying that it’s a foldable that happens to have two screens instead of one. In most cases except for the “folded postures” like “tent mode”, the two do have a similar setup that can make an app split itself into two parts.
The latter is what makes it difficult to support the Surface Duo’s unique form factor, both for native apps as well as web apps. Microsoft’s new API, which it says is the product of collaboration with Chromium developers, Google, Intel, and the World Wide Web Consortium (W3C), aims to make it easier to adapt existing web apps for this foldable world.
The challenge for these apps is detecting when there are two display regions, like the default case for dual-screen foldable like the Surface Duo, so that the content’s layout could be rearranged as need. Microsoft’s Web APIs make that easier without having to overhaul the web app’s layout and comes with an implied bonus. If it works on the Surface Duo, the responsive dual-screen layout should also work on a single-screen foldable like the Galaxy Z Fold 2 which can “split” its display into two equal regions as well.
Interestingly, Microsoft is also saying that these experimental features also future-proof apps for foldables with more than two screens. There were prototypes and patents for such devices in the past and while none have made it into production, it might be reassuring for web app developers that they can easily target those too when that day comes.