Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105325

Extend Android platform integration to provide information about multiple displays

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • QPA: Android
    • None
    • 2022wk40FOQtforAndroid
    • 4f0272bef (dev)

    Description

      To make Android Applications able to receive information about available displays, and run the application on the selected one, displayId of this display needs to be received by the Qt API.
      The following APIs look most accurate for that:
      https://doc.qt.io/qt-6/qguiapplication.html#screens
      https://doc.qt.io/qt-6/qml-qtquick-application.html#screens-prop
      Currently, Qt Android Platform integration allows wrapping into QScreen only "primary display" (the one bounded with current activity). Also most important parameter (displayId) is not present in the QScreen class.
      To enable Android Platform integration plugin for delivery of all necessary data about available displays, following extensions needs to be made:

      • Native Java calls (JNI part of platform integration) needs to be extended to reach DisplayManager (android.hardware.display.DisplayManager) and get list of available displays
      • Available displays need to be processed by Android Platform integration and read data wrapped inside the QScreen object
      • QAndroidPlatformScreen needs to treat the displayId of Display object, as id field of the PlatformScreen class (in that way we reduce impact on current API and implementation of core classes like QScreen and QPlatformScreen

      After those extensions in QtBase, the QtDeclarative implementation needs to be also adjusted to propagate the displayId and available displays list to the QGuiApplication class Application qml type.

      More details might be found under https://bugreports.qt.io/browse/QAA-570 epic.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-105325
          # Subject Branch Project Status CR V

          Activity

            People

              qtandroidteam Qt Android Team
              wojblas Wojciech Błaszak
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change