{"id":2846,"date":"2022-10-27T11:16:15","date_gmt":"2022-10-27T18:16:15","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/surface-duo\/?p=2846"},"modified":"2022-10-27T11:16:15","modified_gmt":"2022-10-27T18:16:15","slug":"android-12l-foldable-developers","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/surface-duo\/android-12l-foldable-developers\/","title":{"rendered":"Android 12L for developers on Surface Duo"},"content":{"rendered":"<p>\n  Hello Android developers!\n<\/p>\n<p>\n  We&#8217;re excited to see that Android 12L is being <a href=\"https:\/\/blogs.windows.com\/devices\/2022\/10\/24\/surface-duo-update-brings-familiarity-with-windows-11-and-android-12l-improvements\/\">rolled out to Surface Duo<\/a> devices, and equally keen to see what the Android developer community builds to support it.\n<\/p>\n<h2>Android 12L for foldable app developers<\/h2>\n<p>\n  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:\n<\/p>\n<h3>Dual-screen libraries<\/h3>\n<p>\n  Take advantage of our developer and designer resources at <a href=\"https:\/\/learn.microsoft.com\/dual-screen\">learn.microsoft.com\/dual-screen<\/a> including the <a href=\"https:\/\/learn.microsoft.com\/dual-screen\/android\/api-reference\/dualscreen-library\/\">library of dual-screen layouts<\/a> that includes: FolableLayout, Snackbar, BottomNavigation, FoldableNavigation, and the latest NavigationRail component.\n<\/p>\n<p>\n  To see the user experiences possible on foldable devices, download the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.microsoft.device.samples.dualscreenexperience\">Dual Screen Experience Example<\/a> from Google Play (or get the <a href=\"https:\/\/github.com\/microsoft\/surface-duo-dual-screen-experience-example\">source<\/a>).\n<\/p>\n<p>\n  <img decoding=\"async\" width=\"1089\" height=\"460\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-1.png\" class=\"wp-image-2847\" alt=\"Google Play screenshots of the dual screen experience app\" srcset=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-1.png 1089w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-1-300x127.png 300w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-1-1024x433.png 1024w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-1-768x324.png 768w\" sizes=\"(max-width: 1089px) 100vw, 1089px\" \/>\n<\/p>\n<h3>Jetpack Window Manager 1.0<\/h3>\n<p>\n  Existing Jetpack Window Manager APIs like <a href=\"https:\/\/learn.microsoft.com\/dual-screen\/android\/jetpack\/window-manager\/\">FoldingFeature<\/a> and <a href=\"https:\/\/learn.microsoft.com\/dual-screen\/android\/jetpack\/window-manager\/slidingpanelayout\">SlidingPaneLayout<\/a> will continue to work as expected in Android 12L. You can download and try a variety of <a href=\"https:\/\/github.com\/microsoft\/surface-duo-window-manager-samples\">samples from GitHub<\/a> and follow this <a href=\"https:\/\/developer.android.com\/codelabs\/android-window-manager-dual-screen-foldables\">Codelab<\/a> to learn more.\n<\/p>\n<p>\n<a href=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples.png\" alt=\"Three Surface Duo devices running Android 12L sample apps (for illustrative purposes)\" width=\"1306\" height=\"342\" class=\"alignnone size-full wp-image-2857\" srcset=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples.png 1306w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples-300x79.png 300w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples-1024x268.png 1024w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/12l-samples-768x201.png 768w\" sizes=\"(max-width: 1306px) 100vw, 1306px\" \/><\/a>\n<\/p>\n<h3>Jetpack Window Manager 1.1 alpha<\/h3>\n<p>\n  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 <a href=\"https:\/\/github.com\/microsoft\/surface-duo-window-manager-samples\">samples from GitHub<\/a>.\n<\/p>\n<p>\n  Android 12L also enables some <em>new <\/em>features in Jetpack Window Manager. The <a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/releases\/window\">1.1 alpha<\/a> version includes a mechanism to make existing Activity-based apps dual-screen and large-screen aware \u2013 <a href=\"https:\/\/developer.android.com\/guide\/topics\/large-screens\/activity-embedding\">Activity Embedding<\/a>. The screenshot below shows activity embedding at work:\n<\/p>\n<p>\n  <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-5.png\" class=\"wp-image-2851\" alt=\"Activity embedding sample\" height=\"400\" width=\"300\" \/>\n<\/p>\n<h3>Large screen improvements<\/h3>\n<p>\n  Android 12L also brings improved <a href=\"https:\/\/developer.android.com\/about\/versions\/12\/12L\/summary#multitasking\">multitasking<\/a> 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.\n<\/p>\n<h3>Design Kit<\/h3>\n<p>\n  Our Surface Duo Design Kit has also been <a href=\"https:\/\/devblogs.microsoft.com\/surface-duo\/design-foldable-large-screens\/\">updated<\/a> 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.\n<\/p>\n<p>\n  <img decoding=\"async\" width=\"1428\" height=\"1442\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6.png\" class=\"wp-image-2852\" alt=\"Design kit screenflow examples for a list detail user experience\" srcset=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6.png 1428w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-297x300.png 297w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-1014x1024.png 1014w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-150x150.png 150w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-768x776.png 768w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-24x24.png 24w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-48x48.png 48w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-6-96x96.png 96w\" sizes=\"(max-width: 1428px) 100vw, 1428px\" \/>\n<\/p>\n<h2>Updated Surface Duo emulator images<\/h2>\n<p>\n  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 <a href=\"https:\/\/learn.microsoft.com\/dual-screen\/android\/emulator\/surface-duo-download\">installation instructions<\/a> to <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=100847\">download<\/a> 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!\n<\/p>\n<p>\n  Once installed, you will see two new icons \u2013 the glacier-colored icon is for the <em>Surface Duo <\/em>emulator, and the obsidian-colored icon is for the <em>Surface Duo 2<\/em> form factor.\n<\/p>\n<p>\n  <img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-7.png\" class=\"wp-image-2853\" height=\"200\" width=\"400\" alt=\"Surface Duo emulator app icons\" \/>\n<\/p>\n<p>\n  (macOS users will use shell scripts to start the required emulator, but will see the icon in the dock)\n<\/p>\n<p>\n  Once you\u2019ve 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.\n<\/p>\n<p>\n  <img decoding=\"async\" width=\"1100\" height=\"798\" src=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-8.png\" class=\"wp-image-2854\" alt=\"Surface Duo emulator screenshot showing the launcher app with icons and news widget, as well as the device pose tab in the settings window\" srcset=\"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-8.png 1100w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-8-300x218.png 300w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-8-1024x743.png 1024w, https:\/\/devblogs.microsoft.com\/surface-duo\/wp-content\/uploads\/sites\/53\/2022\/10\/word-image-2846-8-768x557.png 768w\" sizes=\"(max-width: 1100px) 100vw, 1100px\" \/>\n<\/p>\n<p>\n  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 <a href=\"https:\/\/learn.microsoft.com\/dual-screen\/xamarin\/use-emulator\">these instructions<\/a>.\n<\/p>\n<h2>Resources and feedback<\/h2>\n<p>\n  If you have questions about foldable development or want to share your work, please reach out to us on <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/surface-duo-sdk\/bd-p\/SurfaceDuoSDK\">Tech Community<\/a> or find us on <a href=\"https:\/\/twitter.com\/surfaceduodev\">Twitter @surfaceduodev<\/a>.\n<\/p>\n<p>\n  You can also live chat with us on <a href=\"https:\/\/twitch.tv\/surfaceduodev\">Twitch<\/a> this Friday at 11am PST, where we will share more insights on Android 12L and developing for foldable and large screen devices!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Android developers! We&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":17398,"featured_media":2860,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[365,702,706,46],"class_list":["post-2846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-surface-duo-sdk","tag-android-developer","tag-emulator","tag-jetpack-window-manager","tag-surface-duo"],"acf":[],"blog_post_summary":"<p>Hello Android developers! We&#8217;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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/posts\/2846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/users\/17398"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/comments?post=2846"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/posts\/2846\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/media\/2860"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/media?parent=2846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/categories?post=2846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/surface-duo\/wp-json\/wp\/v2\/tags?post=2846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}