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. Android: Return to previous state when re-opening application
Forum Updated to NodeBB v4.3 + New Features

Android: Return to previous state when re-opening application

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 2.5k 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.
  • F Offline
    F Offline
    freeheeler
    wrote on last edited by
    #1

    Hi,
    I'm working on QML application which has several "screens" (splash screen then login then main view, etc..). But when I switch to another application (or android home screen) and switch back to my application, it returns to the splash screen.

    I assume this is because the entire application is just one android activity, but is there a way to know, through Qt or C code, when the activity is being suspended and resumed? So that I could return to the last state my application was in.

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      are you sure it is suspended and not exited and restarted?
      You could try to set the "launch mode parameter":http://developer.android.com/guide/topics/manifest/activity-element.html#lmode to singleInstance.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • F Offline
        F Offline
        freeheeler
        wrote on last edited by
        #3

        thanks for the reply!
        It seems it does indeed exit, with this error:
        E/libEGL (32084): eglDestroySurface:445 error 300d (EGL_BAD_SURFACE)

        I get the same error with a sample QML application (SameGame example from QtCreator).

        I googled around and can't find much of use about this -- any ideas?
        All I can find is that it might be a problem with the app not implementing onPause() and onResume() functions properly, but I'm not sure how I might implement those myself.

        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