{"id":231106,"date":"2024-06-11T21:09:26","date_gmt":"2024-06-11T21:09:26","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2024\/06\/11\/soundcloud-supported-more-screens-using-45-less-code-with-jetpack-compose\/"},"modified":"2025-06-25T17:17:20","modified_gmt":"2025-06-25T17:17:20","slug":"soundcloud-supported-more-screens-using-45-less-code-with-jetpack-compose","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2024\/06\/11\/soundcloud-supported-more-screens-using-45-less-code-with-jetpack-compose\/","title":{"rendered":"SoundCloud supported more screens using 45% less code with Jetpack Compose"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhCLeoegkuk4qnI9iNynKvaCM8Txn4A17yQEB_Us7C0t9yK8Oupk6dgLT-qFOCAr_R2i8T2uSm1H681z20cMFFSKLCwlQkqlFSHbjj6TcD3hh84olygNgRFQiJ8udkNiAPPiaAUq0I77EcRY0_Nr-idxq4z5bLWxGJ5lKrcXKsY2r7RsjiDIkACaAXGiLc\/s1600\/image1.png\" name=\"twitter:image\"\/><br \/>\n<img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhCLeoegkuk4qnI9iNynKvaCM8Txn4A17yQEB_Us7C0t9yK8Oupk6dgLT-qFOCAr_R2i8T2uSm1H681z20cMFFSKLCwlQkqlFSHbjj6TcD3hh84olygNgRFQiJ8udkNiAPPiaAUq0I77EcRY0_Nr-idxq4z5bLWxGJ5lKrcXKsY2r7RsjiDIkACaAXGiLc\/s1600\/image1.png\" style=\"display: none;\"\/><\/p>\n<p><em>Posted by Chris Arriola, Developer Relations Engineer and Nick Butcher, Product Manager for Jetpack Compose <\/em><\/p>\n<p><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhCLeoegkuk4qnI9iNynKvaCM8Txn4A17yQEB_Us7C0t9yK8Oupk6dgLT-qFOCAr_R2i8T2uSm1H681z20cMFFSKLCwlQkqlFSHbjj6TcD3hh84olygNgRFQiJ8udkNiAPPiaAUq0I77EcRY0_Nr-idxq4z5bLWxGJ5lKrcXKsY2r7RsjiDIkACaAXGiLc\/s1600\/image1.png\"><img decoding=\"async\" border=\"0\" data-original-height=\"800\" data-original-width=\"100%\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhCLeoegkuk4qnI9iNynKvaCM8Txn4A17yQEB_Us7C0t9yK8Oupk6dgLT-qFOCAr_R2i8T2uSm1H681z20cMFFSKLCwlQkqlFSHbjj6TcD3hh84olygNgRFQiJ8udkNiAPPiaAUq0I77EcRY0_Nr-idxq4z5bLWxGJ5lKrcXKsY2r7RsjiDIkACaAXGiLc\/s1600\/image1.png\"\/><\/a><\/p>\n<p>\nAs one of the largest audio streaming platforms in the world, <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.soundcloud.android&amp;hl=en_US&amp;gl=US\">SoundCloud<\/a> supports a network of creators who use its service to upload and promote their music. SoundCloud\u2019s developers are always exploring ways to improve its user experience, which means going beyond simply building the best mobile app. The team also wants to make SoundCloud available on as many form factors as possible so users can easily access and listen to SoundCloud in any situation and on the devices that work best for them.\n<\/p>\n<p>\nThat\u2019s why the SoundCloud team adopted <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\">Jetpack Compose<\/a>, Android\u2019s modern declarative toolkit for building native UI. Compose enabled SoundCloud engineers to not only expand the app to more form factors, but also streamline new feature development\u2014in some cases reducing nearly half the code.\n<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"Compose helped us reach new users and markets, ultimately increasing our global reach\u201d \u2014 Vitus Ortner, Android engineer at SoundCloud\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhgMyGjUjVsU5En4cmekWG96Tn4rA6l67NEb-s5ch_L2TK_0JKpUAeetti1e-Ntd0T1Q6XG2K717fEA6GZrzVyjki7sJwnPVWnwebH9hiKe08OEDdPV-fitSITtmh_jbymAPSYx0J15wAAHkjgQSZrdvn6c2ZHGJwceN0bwrOyRKGRY0fyXgAw3skQtDXM\/s1600\/image4.png\" width=\"100%\"\/><\/div>\n<p><\/image><\/p>\n<h3>\n<strong>Simplified UI development with Compose<\/strong><br \/>\n<\/h3>\n<p>\nBefore migrating to Compose, building UI was much slower for SoundCloud developers because they had to constantly switch context between Kotlin and XML. This also made managing and maintaining its design system much more difficult. The team\u2019s engineers wanted to find a simpler way to write code, and they knew Compose would help them get there.\n<\/p>\n<p>\n\u201cWe started adopting Compose to quickly build dynamic layouts using Kotlin, the language we love,\u201d said Vitus Ortner, an Android engineer at SoundCloud. \u201cWe wanted to empower our engineers to effectively create rich UIs through Compose.\u201d\n<\/p>\n<p>\nSoundCloud engineers <strong>overhauled the app\u2019s design system with Compose and can now build new features using 45% less code on average<\/strong>. Compose\u2019s concise Kotlin syntax and its ability to create reusable UI made design and maintenance much easier for the team. Prototyping new features was also simpler thanks to Compose\u2019s declarative approach, as well as its live edit and UI preview features.\n<\/p>\n<p>\n\u201cWe implemented a new content discovery feature with an interactive vertical feed layout. We used Compose to prototype, and it enabled us to iterate fast even when we changed our design ideas daily,\u201d said Vitus. \u201cThat wouldn\u2019t have been possible with Views.\u201d\n<\/p>\n<p>\nCompose\u2019s interoperability with Views made it easier for developers to migrate SoundCloud\u2019s design system to the new toolkit because they could do it gradually. Because SoundCloud uses a model\u2013view\u2013viewModel architecture, developers could reuse the app\u2019s old view models in the new Compose framework. This meant they only needed to migrate the app\u2019s View-based layouts to Compose, rather than rewrite the entire UI layer.\n<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"\u201cCompose helped us reach new users and markets, ultimately increasing our global reach\u201d \u2014 Vitus Ortner, Android engineer at SoundCloud\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgoQJiZkyiSP91VgXfBVSZYfC3bgaVm4ER7VIOmwqQRVPml3TH2TeO_ADBoklOkHyFRMbRlHArBAXD8DfkrLfales1fcGOF32iGqC4kKdWeC4VDZCfuOKZ9bkP3av8wfn_zTTyY66YvHG97kb2USqkAl-Ummn37uNQ51Goz-MCzfwyt62VDts7jg8pjulg\/s1600\/image2.png\" width=\"100%\"\/><\/div>\n<p><\/image><\/p>\n<h3>\n<strong>Optimizing for more form factors with Compose<\/strong><br \/>\n<\/h3>\n<p>\nSwitching to Compose enabled developers to do more than streamline the app\u2019s codebase. It also made supporting multiple form factors easier. With Compose, SoundCloud engineers were able to more easily bring the app to tablets, TVs, cars, and wearables.\n<\/p>\n<p>\n\u201cWe\u2019re using Compose across all form factors in the Android ecosystem,\u201d said Vitus. \u201cWe implemented our Wear OS and TV apps from the ground up with Compose, which allowed us to rapidly iterate and ship new products in a fraction of the time it would have taken before.\u201d\n<\/p>\n<p>\nTo adapt the mobile experience to a variety of screen sizes while maintaining interoperability with existing code, SoundCloud developers provide different XML layouts to combine existing View code with newer Compose components. Easy-to-implement features like this helped the team quickly build experiences across different devices, including optimizing SoundCloud for cars and tablets.\n<\/p>\n<p>\nWith these improvements, <strong>SoundCloud engineers built their Wear OS app and TV app from the ground up in just four months using Compose<\/strong>. According to Vitus, this \u201cwould\u2019ve been unthinkable\u201d using their previous system.\n<\/p>\n<p>\n\u201cOur mobile Compose skills transferred directly to Compose for other form factors,\u201d said Vitus. \u201cThe concepts and most APIs are the same across form factors. We still needed to learn some form factor-specific APIs, like <span style=\"color: #0d904f; font-family: courier;\">ScalingLazyColumn<\/span><span style=\"font-family: arial;\">\u00a0<\/span>for Wear OS and <span style=\"color: #0d904f; font-family: courier;\">TvLazyColumn<\/span> for TVs.\u201d\n<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"UI example\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgCMI9agr5Di4zdiFYCIMC9YF9xT546G6htz5CBjo9pfOm8gkL1AmLFqUpn0nN28qZZ9AvLUvPuTZbLN9Zj4NvWxMfOKF-1xW6NcWc2ZOuk3PiROE8Qwn8_zJ4FigcZKT1htzCzRIf80tUsuUEKGpuvGFX7oyxfVr-PibTzjbGVmZrvzbP3cSv3_lpAaso\/s1600\/image3.png\" width=\"100%\"\/><\/div>\n<p><\/image><\/p>\n<h3>\n<strong>Future investment in Compose<\/strong><br \/>\n<\/h3>\n<p>\nBy migrating its Android app to Compose, SoundCloud developers improved productivity, simplified the app\u2019s code, and established smoother development processes for new features and experiences. Switching to Compose also helped SoundCloud expand to more form factors, creating new ways for users to access the platform.\n<\/p>\n<p>\n\u201cCompose helped us reach new users and markets, ultimately increasing our global reach,\u201d said Vitus. \u201cWe&#8217;re fully committed to Compose and plan to use it for all projects in the future.\u201d\n<\/p>\n<p><iframe title=\"Android Developer Story: SoundCloud supported more screens using 45% less code with Jetpack Compose\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/djsqFDCUQrk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h3>\n<strong>Get started<\/strong><br \/>\n<\/h3>\n<p>\nOptimize your UI development with <a href=\"https:\/\/developer.android.com\/jetpack\/compose\">Jetpack Compose<\/a>.\n<\/p>\n<\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/android-developers.googleblog.com\/2024\/05\/soundcloud-supported-more-screens-with-jetpack-compose.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Chris Arriola, Developer Relations Engineer and Nick Butcher, Product Manager for Jetpack Compose As one of the largest audio streaming platforms in<\/p>\n","protected":false},"author":1,"featured_media":231107,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[146],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/231106"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=231106"}],"version-history":[{"count":0,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/231106\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/231107"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=231106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=231106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=231106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}