قالب وردپرس درنا توس
Home / Tips and Tricks / Develop for foldable units: What you need to know

Develop for foldable units: What you need to know

  Samsung Galaxy Fold Tablet Mode on the Table

The age of the folding device is over us! Or at least it will be very soon, pending a slight delay.

In any case, many industry analysts consider the declining smartphones to be the future. This means that future applications must also be able to be folded. Consumers cling to the piece to get a taste of this new hardware direction. But for us developers? It's just a form factor to target – the Android landscape becomes even more fragmented! Yay!

Larger screen sizes should compare for better user engagement

One thing that struck me as unusual in watching hands-on video by Galaxy Fold was that most apps seemed to support it already. Reviewers ran on "app continuity" and how most apps would jump from the front display to the large central screen seamlessly.

  Samsung Galaxy Fold behind four

He is so hot now!

Apps that do not support the function opens in the middle of the display without scaling and must be restarted. This is quite a janky effect, and since most developers play ball, we really want to be on the right side of history here.

Getting Started – emulating folding devices

The first thing you need to do is download yourself a copy of Android Studio 3.5 Canary 13 and create a new virtual device with Android Q Beta and a folding form factor. This lets you test your app to see how it is handled as folded in half. When you have Android Studio you can get everything you need via AVD Manager as usual.

 Android Q Foldables App Development

definitely be a beta product, and you will surely go into some get bugs. I have tried to load it when I write this article and it crashes for the third time. Having said that, when it's up and running, it's a useful way to quickly test everything that is scaled as it should.

There are also other options. You can switch to Samsung's Remote Test Lab and try to remotely control Galaxy Fold. This means that you control a actual device somewhere. I really like it asking you not to use it to install and play Fortnite! This is not perfect – it is quite slow – but it is also interesting for anyone who is keen to go with a Fold (like yours really).

 Remote Lab Samsung Galaxy Fold

has the ability to try an emulator provided directly from Samsung. What is cool about this is that it comes in APK format and therefore runs on your Android device. You can get APK and find instructions to use it here.

To be honest, you can test a lot of what we should talk about using an old multi-window. To try several resumes right now (explained below in an instant), try this trick I wrote about a while back with Samsung MultiStar.

Support for App Continuity

When it is clear, you are ready to start making the essential changes. To support the continuity of the screen, make sure your app supports runtime configuration. This is something the developers should consider anyway because it is also about using multi-window mode.

(I've played around with my old Axon M – still on Android 7.1 – and I'm surprised at how many apps are already seamlessly customized when you opens the things.)

Here's how we do this by onSaveInstanceState () and permanent storage. In other words, make sure you save your layout and important data during onPause () and then download as needed. You can also use ViewModel to maintain data during configuration changes.

Users want a layout that utilizes the massive screen property they pay ~ $ 2000 to enjoy.

Of course, the layout of your app itself must also be able to scale seamlessly. This is partly a result of good UI design, and partly a question of using ConstraintLayout so that your views are placed in relation to the edges of the screen. Avoid severe coding of your layout sizes and rely on "wrap_content" and "match_parent."

But avoid the temptation to simply stretch everything to fit. Otherwise, what's the point?

 Huawei Mate X Folded Display with Dgit and Android Authority Split

Users really value a layout that utilizes the huge screen properties they pay ~ $ 2000 to enjoy. Consider how Gmail adjusts to display two columns on your tablet. You can achieve the same by using alternative layout resources.

There is some extra work on your part, but it can significantly improve the experience for the end user. If you improve the experience, users are more likely to open your app more often – meaning you make more money!

Multiple Update

Considering the app's life cycle, it is also worth noting the changes Google made to onResume () . Specifically, more than one app can now be in a resumed state, which means that you don't have to worry so much about managing your app paused but visible. This means that many of Google's recommendations in this department are no longer relevant, but it is still worth giving the Multi-Window Support Guidelines a reading if you don't already have one.

  Axon M folding phone

Who remembers this little guy?

To support this, you must add the tag: android.allow_multiple_resumed_activities to your manifest. Then you have to spend some time thinking about how this can change the way users interact with your apps. Determining when to pause the media or when to update the feeds will be the difference between a seamless or inadequate experience.

You also need to use the resizeableActivity attribute: android: resizeableActivity which has undergone some changes in Android Q.

Concluding remarks

As you can see there is nothing new here – and it is probably why so many apps already supported app continuity by default. This has been handled smartly by Google, which means that for once there is not too much work for us to do. Rather, it is about recording, to ensure that an app is already well optimized for the ever-expanding range of form factors that can run it, test it with relevant emulators and tools and be smoother about UI design.

 Samsung Galaxy Fold Open Back

The good news is that larger screen sizes should compare for better user engagement. Get your UX right, and this can be translated into much more screen time for your projects!

Be sure to check back here from time to time. We add more instructions and tips when we learn more.

Source link