Companion App Shortcut spawns new recent app
See original GitHub issueHome Assistant Android version: 2022.3.0-full
Android version: 12
Phone model: Samsung Galaxy S20 5G
Home Assistant version: 2022.2.9
Last working Home Assistant release (if known): N/A
**Description of problem: When launching the app from a shortcut, a new copy of the app is displayed in recent apps. In trying to ensure the phone does not kill the app in the background, I have selected “Keep Open” from the options in recent apps. This now means that every time I launch the app from a shortcut, it creates a new, locked, copy in my recent apps. **
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs): N/A
Screenshot of problem:
Additional information:
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Android Shortcuts - Home Assistant Companion Docs
These shortcuts need to be added from Companion App in Settings so users can drag them on their home screen after long pressing...
Read more >Spawning multiple instances of applications via shortcuts
To open another instance of the app, use the -n option with open. ... execute this and then a keyboard shortcut for the...
Read more >Central for DayZ - Map & Guide - Apps on Google Play
Central for DayZ aims to bring together quality information, maps and guides created by the DayZ community, all packaged into a fast, polished...
Read more >Android Application Launch explained: from Zygote to your ...
It stats listening on a socket interface for future requests to spawn off new virtual machines (VM)for managing new application processes.
Read more >Usage guide - GrapheneOS
Opening an app with the recent apps activity will place it on the furthest right in the recent apps order just like a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your prompt reply.
I use Nova Launcher, tried switching to the default Samsung launcher and experience the same behaviour.
Also tested a fresh install on a Xiaomi Mi5 using Android 8 and exhibits the same behaviour, so it does look to be app related as opposed to device related.
finishAndRemoveTask()
will not work here because the same activity is used when the app is launched and there are other places that open webview instead of just the shortcuts. Also it needs to be called from an activity but shortcuts launch activities, they are not an activity themselves.This does not work, I tested it myself and it does not respect this value
None of the options are viable for us here, as this activity is a webview activity we have things to workaround some of the odd quirks when it comes to multiple shortcuts. The only option that may be viable would be to exclude the screen completely from recents but I also suspect that wont be nice.