Android 12L for developers on Surface Duo

Guy Merin

Hello Android developers!

We’re excited to see that Android 12L is being rolled out to Surface Duo devices, and equally keen to see what the Android developer community builds to support it.

Android 12L for foldable app developers

The good news for developers is that dual-screen APIs have not changed and foldable app enhancements written for earlier versions of Android will continue to work. Here are just a few of the ways that developers build foldable and large-screen aware apps for Android 12L:

Dual-screen libraries

Take advantage of our developer and designer resources at learn.microsoft.com/dual-screen including the library of dual-screen layouts that includes: FolableLayout, Snackbar, BottomNavigation, FoldableNavigation, and the latest NavigationRail component.

To see the user experiences possible on foldable devices, download the Dual Screen Experience Example from Google Play (or get the source).

Google Play screenshots of the dual screen experience app

Jetpack Window Manager 1.0

Existing Jetpack Window Manager APIs like FoldingFeature and SlidingPaneLayout will continue to work as expected in Android 12L. You can download and try a variety of samples from GitHub and follow this Codelab to learn more.

Three Surface Duo devices running Android 12L sample apps (for illustrative purposes)

Jetpack Window Manager 1.1 alpha

Existing Jetpack Window Manager APIs like FoldingFeature will continue to work as expected in the new OS. You can download and try a variety of samples from GitHub.

Android 12L also enables some new features in Jetpack Window Manager. The 1.1 alpha version includes a mechanism to make existing Activity-based apps dual-screen and large-screen aware – Activity Embedding. The screenshot below shows activity embedding at work:

Activity embedding sample

Large screen improvements

Android 12L also brings improved multitasking features that re-create the same side-by-side app productivity experience from Surface Duo on more devices via split-screen mode. App developers that have invested in adaptive layouts and drag-and-drop will see a larger number of customers able to take advantage of those features.

Design Kit

Our Surface Duo Design Kit has also been updated with more large screen guidance to help build adaptive user experiences that work well across device types with Android 12L. Examples include when to use navigation rail and how to combine design patterns in a user task flow.

Design kit screenflow examples for a list detail user experience

Updated Surface Duo emulator images

To make sure developers can also build and test their apps with Android 12L (API level 32), there is also an updated Surface Duo emulator available. Follow the installation instructions to download the Android 12L emulator installer for your platform (Windows, Mac, or Linux). For the first time, we also have a download for Mac computers with Apple Silicon!

Once installed, you will see two new icons – the glacier-colored icon is for the Surface Duo emulator, and the obsidian-colored icon is for the Surface Duo 2 form factor.

Surface Duo emulator app icons

(macOS users will use shell scripts to start the required emulator, but will see the icon in the dock)

Once you’ve started the Surface Duo Android 12L emulator, it will appear in the deploy/debug menu of your IDE, including Android Studio and Visual Studio. You can then use the same device posture feature as previous versions to test how your apps behave on folding devices.

Surface Duo emulator screenshot showing the launcher app with icons and news widget, as well as the device pose tab in the settings window

Note that the Android 12L emulator has a minimum version requirement for the Android Emulator in SDK Tools. Ensure that you have version 31.3.12 or newer (or if you have a canary build, version 32.1.5 or newer). Updating may in turn cause issues with older Surface Duo emulators, which can be resolved by following these instructions.

Resources and feedback

If you have questions about foldable development or want to share your work, please reach out to us on Tech Community or find us on Twitter @surfaceduodev.

You can also live chat with us on Twitch this Friday at 11am PST, where we will share more insights on Android 12L and developing for foldable and large screen devices!

7 comments

Discussion is closed. Login to edit/delete existing comments.

  • Matthew Arp 1

    Only 7+ months after 12L was released… I don’t think I’ll really ever understand Microsoft’s commitment to the Duo line. Like I get wanting to have a piece of the mobile market, but do they really think such a niche form factor coupled with yawn inspiring update timelines is the way to go?

  • Fritzly . 0

    Android 12L is indeed finally available but the real big question here is what is going on with the device itself: Duo 2 unavailable for months; accessories unavailable as well; MS support dodge questions availability question and try to derail the conversation on other, “New” Surface devices; Best Buy completely removed the Duo kiosks…
    Is it possible to know what is going on? in all honesty nowadays I could not, and will not, suggest a DUO to anybody.

  • Mark V 0

    This recent update to 12L has killed my cell connection on Surface Duo 1. I can see the T-mobile tower from my house and immediately after rebooting to apply this update it went from 4 bars full LTE to not even being to receive a text message without going outside and holding the phone up in the air and even then the mobile data icon still shows an exclamation mark which means no data connection. I really like the device but will have to get rid of it soon if this persists. So am reaching out here in the hopes this feedback will help me be able to continue using MS devices.

    • Craig DunnMicrosoft employee 0

      Mark V – please follow up with the team via the Surface Duo product documentation at https://learn.microsoft.com/surface-duo/ – there are a number of support options listed there.

      • Mark V 1

        Thanks for the follow up, Craig, but it was actually a coincidence and the aforementioned cell tower had stopped working just prior to my reboot and remained down for about 12 hours. So I apologize for jumping to that conclusion and pointing the finger at MS, though in my defense the timing was uncanny. I’ve actually been using MS phones since 2012 and reluctantly gave up my Noika Lumia due to the removal of 2G which I found to be the best phone interface I’ve used to date.

        On a positive note, aside from no red accents in dark mode, the 12L upgrade has definitely made the UI more snappy and it feels nicer to use in general but you still haven’t remedied the main flaw: double tap to switch screens. When folded back in one screen mode you simply cannot hold the device in a way that will not activate the rear screen which causes much frustration. If it were to simply turn off the rear facing screen the overall usability would instantly be improved tremendously. Of course someone using an emulator would never even know that’s what happens so maybe some food for thought there as well.

        Please feel free to remove the comments to avoid any confusion going forward.

        Thanks for again for the quick reply!

        • Craig DunnMicrosoft employee 0

          Phew – I’m glad at least the connectivity is resolved!

          Thanks for the feedback on activating the back screen – I’ll pass on to the product team.

          Not sure how helpful this is, but there is a feature which lets you at least ‘force’ single-screen mode to always use the “right” screen (since it has the front-facing camera): which can be set/changed via:
          Settings > Surface Duo features > Screen when folded > Right screen
          Just sharing in case that is of interest.

  • Jeff Pigott 0

    Is there any fixes for notifications not showing for phone calls? Like the phone doesnt ring or show anything?

    Surface Duo2

    Thanks,

    Jeff

Feedback usabilla icon