Multi-window: prevent the out-of-focus app from pausing?


Question

Android 7.0 introduced the native multi-window API which allows apps to be viewed in split-screen mode globally.



However, in actual usage, one downside prevents it from being as useful as some users would imagine. Many apps, when in the multi-window view but not in focus (i.e. user is interacting with another app in the multi-window view), pauses its activities: IM apps would no longer update incoming messages; music/video apps would pause playback; games would not proceed with their actions.



The official developer guideline briefly mentions the pausing behavior, and from what I understand, apps need to be programmed with this in mind so as to not exhibit it. But is there a way I can force the way around the limitation as a user? From what I've heard from fellow users, certain manufacturers' Android forks such as MIUI do not show such pausing whatsoever.



TL;DR: Can I prevent the out-of-focus app from pausing in multi-window?


Answer

Early this November, Google has confirmed that multi-resume - running two apps simultaneously without pausing - will be part of the next major Android release (Q), thus indirectly confirming that this functionality is currently not a part of AOSP Android.



However, Google also stated that...




To help developers provide the best user experience on multi-window
with minimal effort, we're allowing device manufacturers to keep all
apps resumed when in multi-windows in P.



To opt-in to this behavior in Android P, add the following meta-data
in your app manifest:



<meta-data android:name="android.allow_multiple_resumed_activities" android:value="true" />



How to test: There are no device at the moment with this behavior but
device manufacturers are working to update existing devices to allow
developers to test. Stay tuned for more details from device
manufacturers.




This implies that such functionality will be available in Android P at a later time. As of now (December 2018) though, there is zero reference to allow_multiple_resumed_activities in AOSP Android code, meaning that the time has yet to come.



Sources: Google Blog, XDA-Developers






Android Q beta was released on March 13, 2019, marking the first public debut of the multi-resume feature on non-OEM Android. Unfortunately, there's still no reference to allow_multiple_resumed_activities in AOSP Android P code (Q not open-source yet, obviously), and the "There are no device at the moment with this behavior" statement didn't change in the aforementioned blog either - the situation remains unchanged for the majority of users and the custom ROM community.






As of the formal release of Android 10, multi-resume has been made the default behaviour, as indicated in the multi-resume design page.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes