Posted by Sa-ryong Kang and Miguel Montemayor – Developer Relations Engineers
Peacock is NBCUniversal’s streaming service app out there within the US, providing culture-defining leisure together with stay sports activities, unique unique content material, TV reveals, and blockbuster motion pictures. The app continues to evolve, changing into greater than only a platform to look at content material, however a hub of leisure.
Immediately’s customers are consuming leisure on an more and more wider array of gadget sizes and kinds, and particularly are transferring in direction of cell units. Peacock has adopted Jetpack Compose to assist with its journey in adapting to extra screens and assembly customers the place they’re.
Adapting to extra versatile kind components
The Peacock growth staff is targeted on bringing the perfect expertise to customers, it doesn’t matter what gadget they’re utilizing or after they wish to eat content material. With an rising pattern from app customers to look at extra on cell units and huge screens like foldables, the Peacock app wants to have the ability to adapt to totally different display screen sizes. As extra units are launched, the staff wanted to discover new options that take advantage of out of every distinctive show permutation.
The objective was to have the Peacock app to adapt to those new shows whereas frequently providing high-quality leisure with out interruptions, just like the stream reloading or visible errors. Whereas pondering forward, additionally they needed to organize and construct an answer that was prepared for Android XR because the leisure panorama is shifting in direction of together with extra immersive experiences.
Constructing a future-proof expertise with Jetpack Compose
So as to construct a scalable answer that might assist the Peacock app proceed to evolve, the app was migrated to Jetpack Compose, Android’s toolkit for constructing scalable UI. One of many important instruments they used was the WindowSizeClass API, which helps builders create and take a look at UI layouts for various dimension ranges. This API then permits the app to seamlessly change between pre-set layouts because it reaches established viewport breakpoints for various window sizes.
The API was used along side Kotlin Coroutines and Flows to maintain the UI state responsive because the window dimension modified. To check their work and fantastic tune edge case units, Peacock used the Android Studio emulator to simulate a variety of Android-based units.
Jetpack Compose allowed the staff to construct adaptively, so now the Peacock app responds to all kinds of screens whereas providing a seamless expertise to Android customers. “The app feels extra native, extra fluid, and extra intuitive throughout all kind components,” stated Diego Valente, Head of Cell, Peacock and International Streaming. “Meaning customers can begin watching on a smaller display screen and proceed immediately on a bigger one after they unfold the gadget—no reloads, no friction. It simply works.”
Getting ready for immersive leisure experiences
In constructing adaptive apps on Android, John Jelley, Senior Vice President, Product & UX, Peacock and International Streaming, says Peacock has additionally laid the groundwork to shortly adapt to the Android XR platform: “Android XR builds on the identical massive display screen ideas, our funding right here naturally extends to these rising experiences with much less developmental work.”
The staff is worked up in regards to the prospect of options unlocked by Android XR, like Multiview for sports activities and TV, which permits customers to look at a number of video games or digicam angles directly. By tailoring spatial home windows to the person’s surroundings, the app might provide new methods for customers to work together with contextual metadata like sports activities stats or actor data—all with out ever interrupting their expertise.
Construct adaptive apps
Discover ways to unlock your app’s full potential on telephones, tablets, foldables, and past.
Discover this announcement and all Google I/O 2025 updates on io.google beginning Could 22.
No Comment! Be the first one.