The age of the folding device is upon us! Or at least it will be very soon, until a slight delay is due.
In any case, many industry analysts believe that smartphones are the future. This means that the apps of the future must be foldable. Consumers are screaming to get a taste of this new hardware orientation. But for us developers? It's just another form factor for targeting – the Android landscape is becoming more and more fragmented! Yay!
Larger screen sizes should be equated to better user retention.
One thing that seemed to me to be touching as unusual videos of the Galaxy Fold was the fact that most apps already seemed to be. Reviewers raved about "app continuity" and how most apps seamlessly jumped from the front display to the large central display.
Apps that No support for . The function is opened in the middle of the display without scaling and must be restarted. This is a pretty shabby effect, and with most developers playing with the ball, we really want to be on the right side of the story.
Getting Started – Emulating Foldable Devices
The first thing you need to do is to self-download a copy of Android Studio 3.5 Canary 13 and create a new virtual device with Android Q Beta and a collapsible form factor. That way, you can test your app to see how it's folded in half. Once you have Android Studio, you can get everything you need from the AVD Manager as usual.
Be forewarned that the Foldable Emulator is definitely a beta product, and you will certainly one find a few bugs. I tried loading it while writing this article. Currently it crashes for the third time. That said, once it's up and running, it's a useful way to quickly test whether everything is scaled as it should.
There are other options as well. You can go to the Samsung Remote Test Lab and try to run a galaxy fold remotely. This means that you need to control a current device somewhere. I think it's great that you're being asked not to install and play Fortnite. This is not perfect – it's pretty slow – but it's also interesting for anyone who wants to try a fold (like yours really).
Finally you too You can try an emulator provided directly by Samsung. What's cool about this is that it comes in APK format and therefore actually runs on on your Android device. You can download the APK here and find instructions for use.
To be honest, you can test a lot about what we want to talk about with the good old multi-window. Now to do the multi-resume experiment (explained below), try this trick I wrote a while ago with Samsung MultiStar.
App continuity support
Once the system is up and running, you can start creating the most significant changes. To support screen continuity, you must ensure that your app supports runtime configuration changes. Developers should consider this anyway, as they also refer to the use of multi-window mode.
(I've played I'm amazed at how many apps already seamlessly adapt when you open the thing.)
We do this by onSaveInstanceState (). and persistent storage. So make sure you save your layout and all important data during onPause () and then retrieve it as needed. You can also use ViewModel to preserve data during configuration changes.
Users want a layout that takes full advantage of the huge screens that they pay US $ 2,000 for.
Of course, the layout of your app itself must also be able to scale seamlessly. This is partly the result of a good UI design and partly a matter of using ConstraintLayout so that all views are positioned relative to the edges of the display. Avoid hard coding your layout sizes and rely instead on "wrap_content" and "match_parent".
But avoid the temptation to stretch everything at will. Otherwise, what's the point?
Users really appreciate a layout that fully exploits the massive screen situation that they pay for ~ $ 2,000. Imagine how Gmail adapts to show two columns on the tablet. You can do the same with alternative layout resources.
While this may be a bit more work, it can greatly enhance end-user usability. As you enhance the user experience, users will open your app more often-meaning you'll make more money!
If you're talking about the app lifecycle, you should also note the changes made by Google to onResume () . Specifically, more than one app can now be in a resumed state, which means you do not have to worry so much about your app being paused but visible. This means that many of Google's recommendations in this department are no longer relevant, but it's worth reading the multi-window support guidelines if you have not done so already.
However, to support this, you must add the tag android.allow_multiple_resumed_activities to your manifest. Then you need to spend some time thinking about how this can change the way users interact with your apps. Deciding when to pause media or update feeds is the difference between a seamless or flawed experience.
You also need to use the attribute resizeableActivity: android: resizeableActivity which has undergone some changes in Android Q.
As you can see, there is nothing new here – and that's probably why so many apps have defaulted on app continuity by default. This was cleverly done by Google, which means we do not have to do too much work for a change. Rather, it is a matter of catching up to ensure that an app is already optimized for the ever-expanding array of form factors that it can run, testing it with the appropriate emulators and tools, and making the design of the interface smarter.
The good news is that larger screen sizes should equate to better user interaction. Get your UX right, and this could result in a much longer screen time for your projects!
Take a look here from time to time. We will add more instructions and tips as we learn more.