Surface Duo Blog
Build great Android experiences, from AI to foldable and large-screens.
Latest posts
Android foldable support on Uno Platform
Hello XAML developers! The Uno Platform has supported Microsoft Surface Duo since early 2020 – the Uno Platform team even shared get started tips on this blog. This support was based on the DuoSDK NuGet, which exposes the Microsoft DisplayMask API in C#. The Uno Platform implements the TwoPaneView control on all supported platforms, and by adding the Uno.UI.DualScreen NuGet it will ‘light up’ on Surface Duo, detecting the hinge and laying out the two panes accordingly. At UnoConf 2021 this week, we announced that we’ve been working with the Uno Platform team to support the new Jetpack Window Man...
Foldable CSS and JavaScript update for web developers
Hello web developers! The dual-screen CSS and JavaScript enhancements for Microsoft Edge were initially shared in June 2020 when they were first available behind a feature flag for testing. Since then there has been a lot of work and feedback on the proposals, and the implementation currently available in the latest version of Microsoft Edge (version 96) has been updated to reflect the final API design. The changes are described below, and the documentation is up to date for the latest CSS and latest JavaScript syntax. These features are still behind a feature flag which you can enable for test...
Get started with Jetpack Compose
Hello (future) Jetpack Compose developers! This week, we want to talk about how to get started on building applications with Jetpack Compose. A few of us on the Surface Duo Developer Experience team recently began learning Compose, so we’d like to share some advice and resources with you. To read more about the work we’ve been doing with Compose, check out our NavigationRail, TwoPaneLayout, Compose for foldables, and Compose on Microsoft Surface Duo blog posts. Overview For those of you who are unfamiliar with Compose, it’s a declarative UI toolkit that acts as a replacement for the XML la...
Design Kit 2.1
Hello designers! We recently unveiled Design Kit v2.1 – a set of updates to the design system kit that enables you to create dual-screen and foldable experiences for Microsoft Surface Duo and Surface Duo 2 in Figma. Figure 1: Design Kit v2.1 on Figma Figma device frame Figure 2: Figma device frames Today you can start creating wireframes and mockups for Surface Duo and Surface Duo 2 by grabbing the Figma frame and placing your components inside them. Visually you may notice that Surface Duo 2 has a taller frame height and slimmer hinge compared to Surface Duo since it ro...
Jetpack Compose Navigation Rail
Hello Jetpack Compose developers! This week, we released a new sample that demonstrates how to use the NavigationRail component with large screen and foldable devices. These guidelines were also introduced recently in the Microsoft Surface Duo Design Kit 2.1. Create a NavigationRail with Compose We first blogged about NavigationRail in August, when we described how to use it in a dual-screen sample with XML layouts. As a reminder, the NavigationRail component is used for navigation on large screens and can hold 3-7 app destinations, plus a logo or floating action button. To add a NavigationRail to your Co...
Android Dev Summit recap
Hello Android developers! This week’s blog includes lots of news from Google's Android Dev Summit – especially for dual-screen, foldable, and large screen app developers. The Surface Duo Developer Experience team is here to help developers plan and adapt their Android apps for new form factors like Microsoft Surface Duo 2. Here are some highlights from the summit and where to get more information to put the ideas into practice! Dual-screen and foldable apps The Android team ran a session focused on building or adapting apps for large screen and foldable devices, building on their large sc...
See your app on Microsoft Surface Duo 2!
Hello Android developers! Now that Surface Duo 2 is readily available, there’s even more reason to start enhancing your Android apps for foldable devices. Visit our developer documentation to get started! Figure 1: Surface Duo 2 is now available! Surface Duo 2 emulator If you don’t yet have a device, you can easily build and test apps for Surface Duo 2 using our latest Android 11 emulator. Download and install the Surface Duo 2 emulator to test your apps in single and dual-screen modes, including adjustments based on hinge angle: Figure 2: Surface Duo 2 emulator device post...
Happy Hacktober
Hello open source developers! For the past few years October has become synonymous with open source, so this year we’ve decided to opt-in our samples repositories to Hacktoberfest to encourage the community to join us in building dual-screen enhanced Android projects. Figure 1: Build or contribute to apps for Microsoft Surface Duo 2 What is Hacktoberfest? Hacktoberfest is a celebration of open source projects and contributions, run by Digital Ocean. It encourages developers to participate in open source projects with the offer of a free t-shirt for qualifying contributions. We’ve adde...
Erase pen handling code with the Ink SDK
Hello Android developers! We’ve just updated one of our existing samples – TwoNote – to include the Ink SDK preview introduced in March and updated in July. TwoNote now also uses the Jetpack Window Manager library to provide foldable support. If you want to check out the updated sample for yourself, this is the perfect time to download the new Microsoft Surface Duo 2 emulator and start building or enhancing apps for Surface Duo 2! Pen and ink SDK The SDK is based on the pen input classes available in Android, as demonstrated in our sample, and it provides two main classes to help you implement pen support...