28 Mar 2019

Optimize your app development for foldable displays

By Sabrina (Portal Administrator)

Pushing the limits of mobile tradition, Samsung revealed a revolutionary new smartphone category at Unpacked 2019. The arrival of the Galaxy Fold sets a new precedent for developers across the globe.

At its core, the Galaxy Fold aims to provide a seamless and immersive app experience across its two screens. When it’s folded, the cover screen displays important info at a glance; unfold it to reveal a powerful workspace with robust multitasking capabilities. Pair it with Samsung DeX and it transforms into an indispensable setup for working professionals.

Of course, innovation comes hand-in-hand with change. Android developers will need to be aware of a few noteworthy changes when developing apps for foldable devices.


App continuity

In order to maintain a seamless Fold experience, supported apps will need to be optimized for quick screen switching and varying screen resolutions. It’s important to note that folding and unfolding the phone triggers a configuration change, which destroys the app activity and recreates it. Optimized apps must be designed to restore from their previous state. See the Android Developers documentation for more info on how Android handles configuration changes.


Multi-window experience

With more screen real estate, an improved multi-window experience—along with an increased demand for apps that execute it well֫—is on its way. Prior to Android P, only the top app was considered active and all other apps open in multi-window mode assumed a “paused” state by default. Now with multi-resume, a new feature introduced in Android P, all apps open in multi-window mode can be concurrently active. Learn how to enforce multi-resume behavior with this documentation on app design for foldables.


Layout optimization

As the cover display of the Galaxy Fold will have a 21:9 aspect ratio, apps will need to support a maximum aspect ratio in order to fill the screen. If you’re testing your app in an emulator environment that does not support the 21:9 ratio, you may experience resizing issues. Creating a separate resource folder to ensure that your content stays dynamic is also a good practice. For more information on how to do this, see the Android Developers site.


Next Steps

The future of smartphones is here, and developers are leading the charge. Join the conversation in our Developer Forum!