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

Android application unresponsive when launching a second task

    XMLWordPrintable

Details

    • Android

    Description

      Idea:

      I need my activity to handle additional intents (besides the "main" launcher intent) so that it can be invoked from other activity using "startActivityForResult" and remain in top of that task (i.e. I don't want it to show in a separate task).

      So I add the new intent filter (e.g. a "view" intent) to the activity. When you launch the activity from home screen and suspend that instance, trying to launch another instance through a "view" intent from another task will cause both activity instances to become unresponsive.

      To reproduce (see attachment):

      1. Create a file on your development machine with extension '.foo' and copy to android device (name, path and file contents may be anything)
      2. Deploy app to android device; make sure that the task list is clear (no suspended activities)
      3. Open app from launcher
      4. Press <home> button to minimize (i.e. activity instance becomes suspended)
      5. Open android file manager
      6. Select '.foo' file in device; android will try to open it with app (according to intent in manifest) and launched activity instance will show a blank screen
      7. Press <home> button and/or open task list; select first app instance, it will show but is unresponsive
      8. To clear things up, one of the unresponsive instances needs to be killed (i.e. open task list and swipe it out)

      Additional notes:

      • Attached application is a barebone android project; the only add-on is an intent filter for "view" actions on '.foo' files (see 'AndroidManifest.xml')
      • Changing "launchMode" in manifest to "singleTask" or "singleInstance" is a workaround, but does not apply for the intended use case in which you want to show the activity on the same task that it was launched from (in this example, the file manager)
      • In step (4), if you press <back> button (instead of <home>) the first instance is effectively killed, so the bug will not show up; the problem seems to arise when there is a suspended activity instance

       

      Attachments

        1. parent_activity.png
          13 kB
          Tapio Oksa
        2. qtAndroidBug.zip
          7 kB
          scdevelop
        3. qtbug65894.zip
          62 kB
          Tapio Oksa

        Activity

          People

            qtandroidteam Qt Android Team
            scdevelop scdevelop
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: