Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.3, 5.12.6
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):
- Create a file on your development machine with extension '.foo' and copy to android device (name, path and file contents may be anything)
- Deploy app to android device; make sure that the task list is clear (no suspended activities)
- Open app from launcher
- Press <home> button to minimize (i.e. activity instance becomes suspended)
- Open android file manager
- 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
- Press <home> button and/or open task list; select first app instance, it will show but is unresponsive
- 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