-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Support multi-display on Android #134405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have any example of native Android apps that do this? (or any explanation on that matter) As for running Flutter in secondary display, you can already do that. |
I am working on a point of sale (POS) which can also run on a Android device with a second screen. Something like this elo device. From the documentation aspect check this. The main aspect is that I would like to have a single widget tree with two rendering piplines (one per screen) so that I can keep things in sync with the same state, without using a second activity and interprocess comunication. |
This is not what you want. The documentation is about having multiple apps in a screen rather than an app in multiple screens. |
Actually it is the right page, just you need to scroll down a bit, to the section multi display (I had to build the anchor part of the url by hand) Figure 3. Multiple instances of an activity on multiple displays. |
We think that multi display is currently a nice to have for android. Flutter more broadly is working on multi view but it requires examining a lot of the codebase where we make the assumption that there is one widget tree. I expect that one of the desktop/web platforms will support multi display first. Android can then re evaluate the demand and effort required to land that feature. |
@reidbaker I do have another possible use case for multi window on mobile (Android and iOS) besides the big screens. We are adding Flutter to a native app. For this you have to make a decision for running 1 engine or running multiple engines. When going for multiple engines it's possible to show multiple Flutter views inside the native app, but it's very difficult (at this moment) to share data between the engines. That's basically Phase 3 of this story: #72009 The other option (that we currently do) is to use 1 engine and make sure you navigate correctly between different Flutter features. That way you easily share state between features just like a regular Flutter app. However, because we only have 1 engine, we can only show 1 Flutter feature at a time. When we have multi-window on Android it would be really nice if we can use that multi-window structure to show multiple Flutter windows inside an existing native app. I think having multi-window on 1 engine is my preference over having easier interop between multiple engines. |
The best example I can come up with for this is in existence within Microsofts own Powerpoint app which works the same as the PC version with limitations. |
Use case
Similar to #30701 and #48838
Android has also multi window/display support I would like to use this feature. This could be helpful for picture in pucture mode too.
For testing can be a second screen enabled in the developer settings of Android.
Documentation about multi display on Android can be found here.
The text was updated successfully, but these errors were encountered: