Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt app started from android device shows white screen
Forum Updated to NodeBB v4.3 + New Features

Qt app started from android device shows white screen

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 5 Posters 6.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simgunz
    wrote on last edited by
    #1

    If I deploy and application from QtCreator to an android device (tested on two different devices, same result) the app starts fine. Then I hit the home button and I get to the android menu. So I hit the application launcher and I start it a second time, at this point I see a white screen and the application won't load. If I rotate the screen the application crashes and soon after it is reloaded and starts correctly. This happens all the time the application is started from the launcher.

    Anyone know how can I solve this?

    1 Reply Last reply
    1
    • X Offline
      X Offline
      Xander84
      wrote on last edited by
      #2

      I think I have the same problem, seems like android tries to start the app again, even though it is already running. I don't know why that is happening but to me android should manage the running apps and just show the running app instead of launching another instance. if you use the app switcher it works like expected, maybe some weird Qt bug or feature but seems weird behavior to me, yes.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        simgunz
        wrote on last edited by
        #3

        I've noticed that after a phone reboot the app seems to work fine both using app switcher and launching it from app launcher.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          Xander84
          wrote on last edited by
          #4

          Yeah well if you close the app you can start it from the launcher obviously (I think if you restart the phone it will close all apps). You know you can manually close an app from the app switcher? then you can start it again :D
          I don't know what exactly happens and why it stays "white" I just assumed Qt/Android tries to start another instance of the app instead of switching to the running app, because it works with the app switcher or if you run another app from your app (like the browser) and use the back button also works fine!

          1 Reply Last reply
          0
          • S Offline
            S Offline
            simgunz
            wrote on last edited by
            #5

            No I meant a different thing:

            The first time you load the app on the android device:
            1.the first time the app starts fine
            2.press the home button
            3.press the app launcher -> white screen
            4.press the home button
            5.select the app from the app switcher -> app starts fine

            Reboot the android device:
            1.the first time the app starts fine
            2.press the home button
            3.press the app launcher -> the app starts fine! (it's recalled from it previous state)
            4.press the home button
            5.select the app from the app switcher -> app starts fine

            So after rebooting the phone the problem seems disappeared.

            1 Reply Last reply
            0
            • I Offline
              I Offline
              Iktwo
              wrote on last edited by
              #6

              I'm having a similar issue, I wrote a launcher with qml, when it is deployed and start from qtcreator I can see it, if I then go to the app switcher and then press home, it looks like my application is trying to start again and it fails, I see just a white screen :S the worst part is that if I set my launcher as default and I reboot I will see nothing but a white screen

              This is what I get

              @
              W/Adreno-EGLSUB(18476): DequeueBuffer:606: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
              W/Adreno-ES20(18476): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY
              W/Adreno-EGL(18476): <qeglDrvAPI_eglSwapBuffers:3597>: EGL_BAD_SURFACE
              W/Qt (18476): eglconvenience/qeglplatformcontext.cpp:332 (virtual void QEGLPlatformContext::swapBuffers(QPlatformSurface*)): QEGLPlatformContext::swapBuffers(): eglError: 12301, this: 0x774d0da8
              W/Qt (18476):
              E/Qt JAVA (18476): Surface 1 not found!
              I/Timeline(18476): Timeline: Activity_idle id: android.os.BinderProxy_41b4ac00 time:1784196
              @

              This is how it looks when everything is ok

              http://imgur.com/jakTR8J

              This is what I gett when it fails

              http://imgur.com/0G44W9E

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pkoretic
                wrote on last edited by
                #7

                This may be late but since nobody replied, setting:
                android:launchMode="singleInstance"
                fixes the problem above.

                more information here:
                http://developer.android.com/guide/topics/manifest/activity-element.html#lmode

                Using qt 5.4.

                1 Reply Last reply
                1
                • S Offline
                  S Offline
                  simgunz
                  wrote on last edited by
                  #8

                  Thank you. I haven't work anymore on that project so I haven't fixed that. I'll try.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    ahmad88me
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved