Surface Duo Blog
Build great Android experiences, from AI to foldable and large-screens.
Latest posts

TwoDo dual-screen data entry sample

Hello Android developers! A common “first app” for new developers is a simple to-do list app – it typically incorporates data entry, database storage, multiple views, and simple navigation, so it’s great for learning. The app I’m sharing today, called TwoDo, is exactly that, except it is also built for dual-screen devices like Microsoft Surface Duo. It will ultimately be used in a Microsoft Learn module to show developers how they can use Jetpack Window Manager to create dual-screen app experiences. App Overview TwoDo is a basic to-do list app that leverages the dual-screen layout of foldabl...

eBook sample with Jetpack Window Manager
Hello Android developers! Reading books on Microsoft Surface Duo can be a great take on the classic reading experience. In this blog, we will walk through an eBook reader sample I created as an internship project. This eBook sample demonstrates how the Two Page layout for foldable devices can naturally spread content across multiple screens. Base functionality This project is designed to load plain text files and present them in book form. The text is parsed into chapters according to some basic rules, and chapters are cached as arrays of strings (one string per paragraph). To build pages, the co...

New TwoPaneLayout Compose library preview
Hello Android developers! Google just announced the first release candidate for Compose on 07/01. We are getting one big step closer to stable this month! In previous blogs, Jetpack Compose on foldable and dual-screen development and Jetpack Compose on Microsoft Surface Duo, we mentioned that there are two main steps you can implement to develop or enhance your application to leverage these new form factors using this new UI toolkit: TwoPaneLayout preview Today we are introducing a new library, TwoPaneLayout, which can help you simplify this implementation. You can easily integrate the librar...

Hover-ink over dual-screens

Hello Android developers, This week we’re releasing the alpha4 version of our pen SDK preview. The pen SDK is intended to help developers add drawing capabilities to their Android apps, accepting input using touch or pen (including pen features like the eraser tip). The latest open-source SDK code and sample app are available on GitHub in the surface-duo-sdk repo in inksdk. This post discusses the changes in this release. New pen-hover indicator Microsoft Surface Duo can detect when the pen tip is near to the screen. The InkView now detects when the pen is close and shows visual feedback t...
ExoPlayer video on dual-screen and foldable devices

Hello Android developers! The Microsoft Surface Duo is a great device for consuming multimedia content, and ExoPlayer is a simple, powerful widget for rendering video. Raymond and I are interns on the Surface Duo Developer Experience team, and we're excited to share two dual-screen enhanced samples that showcase video experiences on foldable devices. Our samples were inspired by this Google I/O video Foldables - WindowManager with MotionLayout and the ConstraintLayout FoldableExperiments sample. The goal for each sample is to demonstrate a video player user experience that works great on single...

Developing for Android on Windows

Hello Android developers! Today Microsoft announced the next version of Windows and a new Windows Store, and we’re excited to see how people take advantage of its new features. One thing that hasn’t changed is that Windows is still the best platform to design, build, test, and deploy Android apps. All tools welcome No matter what development environment you use, it runs on Windows. Android Studio, Visual Studio, VS Code, and Unity are all available, so whether you program in Kotlin, Java, C#, JavaScript, TypeScript, or Flutter, you get a great developer experience. You can even develop and...

Window Manager preview for Xamarin
Hello Xamarin developers! We’ve discussed Window Manager in previous blog posts – it’s an AndroidX library that brings dual-screen and foldable support to Android, across a variety of devices including Microsoft Surface Duo. Window Manager is now available to test with Xamarin.Android apps via a prerelease NuGet Xamarin.AndroidX.Window. UPDATE: on August 18th, 2021 Google released beta01 of the Jetpack Window Manager package, which is bound in the Xamarin.AndroidX.Window NuGets. As part of the latest release, Google added a package for better backwards compatibility. This package is better suite...

Surface Duo Design Kit update

Hello designers, Today we are excited to share you with an update to the Design Kit for the Microsoft Surface Duo that’s available on Figma for download. The latest update to our Design Kit version 0.4 includes: In this blog post we want to highlight details of the guidelines, principles, and inking gestures for pen interactions on the dual-screen form factor. We hope that these details help you create the best inking experience for your users. Inking Principles When it comes to Android devices like the Surface Duo – offering mobile productivity, inkin...
A new angle on Flutter

Hello Flutter developers! Today we are taking a closer look at the hinge on Microsoft Surface Duo and other foldable devices. The hinge holds the two parts of the device together, but it also has a sensor inside which tells us about the angle between the two screens. Figure 1: Surface Duo Hinge in action Hinge angle vs device posture The hinge angle is already used to calculate the device posture, which is exposed using MediaQuery. The MediaQuery update is included in the Flutter foldable support we blogged about previously, and which is currently in review. For example, the “half-open...