Top 5 Factors to Consider While Developing Apps for Foldable Devices
There’s a lot of buzz in the tech market about foldable devices – basically, smartphones having large and wide screens that can be folded to showcase portrait and landscape dimensions according to one’s convenience.
Tech giants like Samsung, Huawei and LG have already made their mark with innovative foldable smartphones that offer unique immersive user experiences.
But, are new and existing mobile apps ‘foldable-friendly’? What all factors are to be considered while making apps for such foldable devices?
Let’s find out.
- App Continuity
An app running in a foldable device must be able to work seamlessly regardless of the transition of the screen; i.e, the app task should not get interrupted due to folding/unfolding of the device.
Here, the basic concept is that the task is destroyed and recreated during screen transitions. For this, your app should support runtime configuration changes (add android:configChanges attribute to the manifest) and also save UI state and data (use onSaveInstanceState() and ViewModel).
For testing app continuity, use the emulator app from Samsung.
- Screen Ratio Compatibility
Ultra-wide screens offer a truly engaging experience to users. In fact, form factors for foldables can range from 21:9 (long and thin screens) to 1:1 and so, it’s important to resize apps to suit all the major screen ratios.
In order to ensure that your app correctly fits various form factors, declare the maximum aspect ratio that your app can support.
<meta-data android:name=”android.max_aspect” android:value=”ratio_float”/>
where ratio_float indicates the maximum aspect ratio (longer dimension / shorter dimension).
Most foldable devices have dual screens; Chinese tech giant TCL has even launched triple-screen foldables. In dual-screen devices, there are two displays – the Cover display (mobile-size) and the Main display (tablet-size). Here, users can move an app activity between the displays and the app has to specify on which display it intends to run.
This is done with ActivityOptions that has two new methods for multi-display support – setLaunchDisplayId()
To specify the display where the activity has to be shown after launch.
To return the current launch display of the activity.
Multi-window support is a key feature of foldable devices – one can multitask with upto 3 apps running at the same time on the Main display screen. For example, users can type an email on the left side and view a video on the top right side and a web page on the bottom right side.
To configure apps for multi-window mode, set android:resizeableActivity attribute to true. For Picture-in-picture display, set android:supportsPictureInPicture to true. Also, adding drag and drop functionality to apps is an additional advantage.
While multitasking on foldables, it’s great if all the apps in multi-window mode run unpaused, without any halts. Keeping this in mind, Android Pie introduced the multi-resume feature wherein all the apps (not just the app in main focus) visible on the screen, are in resumed state.
For this, the following meta-data can be added to the app manifest:
<meta-data android:name=”android.allow_multiple_resumed_activities” android:value=”true” />
Foldables are likely to introduce new mobile app development paradigms and can cause significant market disruptions for major industry verticals.
So, by utilizing the services of a top mobile app development company, you can feel assured that your business is also ready for foldable devices.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?