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

[Android] The splashscreen starts late and ends with a flicker

    XMLWordPrintable

Details

    • Android
    • 2022wk30FOQtforAndroid, 2022wk32FOQtforAndroid, 2022wk34FOQtforAndroid, 2022wk36FOQtforAndroid, 2022wk38FOQtforAndroid, 2022wk40FOQtforAndroid, 2022wk42FOQtforAndroid, 2023wk02FOQtforAndroid, 2022wk44FOQtforAndroid, 2022wk46FOQtforAndroid

    Description

      I am using QQmlApplicationEngine together with an ApplicationWindow on the qml side. If I enable the splashscreen I notice 2 things:

      1) The splashscreen starts late. This is very noticeable on some low-end devices, when the splashscreen is displayed after 3-4 seconds since the app was opened. In that interval, the screen is black.

      However, there is a fix/workaround. Using a custom theme:

      // theme.xml in res/values and android:theme="@style/MyAndroidStyle in AndroidManifest

      <?xml version="1.0" encoding="utf-8"?>
      <resources>
          <style name="MyAndroidStyle" parent="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
              <item name="android:windowBackground">@drawable/logo</item>
          </style>
      </resources>
      

      With this fix/workaround, the splashscreen is displayed instantly.

      2) When the splashscreen is gone and the qml is about to be exposed there is a very quick flicker that coincides with:

      W/Qt      ( 3076): (null):0 ((null)): QEGLPlatformContext::swapBuffers(): eglError: 12301, this: 0x67996800 
      

      I've tried to overcome this flicker on the Android side, by adding an overlaying view above getWindow().getDecorView().getRootView() of the main activity. This overlay covers the Qt surface entirely. Even so, the flicker still happens and it affects the overlaying Android view as well. I don't think this can be workarounded on the Android side.

      Maybe the EGLSurface is not yet initialized and has nothing to display? Might be a good idea to initialise the EGL surface with the "android.app.splash_screen_drawable", if possible.

      Attachments

        1. qt51510-splash.mp4
          729 kB
        2. splash515qmake.7z
          389 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rampe Rami Potinkara
              adrian.gabureanu Adrian Gabureanu
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              34 Vote for this issue
              Watchers:
              31 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes