Posted by Leo Sei, Product Supervisor on Android
Listed here are a set of suggestions and knowledge to ensure your software supplies an excellent consumer expertise on this new type issue (you can even take a look at the Android Dev Summit devoted session here)
1. Display continuity
On this new type issue, your software may very well be transitioned from one display to a different mechanically (eg. when folding / unfolding a foldable telephone).
Throughout this transition, your app will obtain a configuration change for the brand new format (and probably density in some circumstances).
To offer an excellent consumer expertise when altering from one display to the opposite, you need to make sure that your app correctly assist runtime configuration change.
Find out how to check: Emulators for varied units ought to grow to be out there quickly (eg., Samsung will publish a folding / unfolding emulator apk later in This fall which ought to work on Samsung Galaxy S4 tablets in addition to the AOSP emulator in Android studio).
Right now, when an app is in multi-window however not targeted, it’s on the OnPause state.
Whereas we offer suggestions on how to support multi-window, we observed a major variety of apps should not dealing with the onPause state in keeping with these suggestions (video paused or stopped, instantaneous messages not displayed and so forth).
To assist builders present the perfect consumer expertise on multi-window with minimal effort, we’re permitting gadget producers to maintain all apps resumed when in multi-windows in P.
To opt-in to this habits in Android P, add the next meta-data in your app manifest:
<meta-data android:title="android.allow_multiple_resumed_activities" android:worth="true" />
Notice: With the subsequent Android model we’re wanting into the way to optimize compatibility for this habits.
Find out how to check: There are not any gadget for the time being with this habits however gadget producers are working to replace present units to permit builders to check. Keep tuned for extra particulars from gadget producers.
Starting with Android eight.zero (API stage 26), the platform affords enhanced assist for a number of shows. If an exercise helps multi-window mode and is operating on a tool with a number of shows, customers can transfer the exercise from one show to a different. When an app launches an exercise, the app can specify which show the exercise ought to run on. See here for the complete documentation
Find out how to check: You’ll be able to attempt it out through the use of the “Developer choices > Simulate secondary shows” possibility. Take into account that these simulated show don’t course of inputs.