Kill App & Always Open New Copy of App Not Working

198 views
Skip to first unread message

Anthony C

unread,
Apr 21, 2018, 2:39:55 AM4/21/18
to Tasker
Running stock Nexus 6P here with Android 8.1 and the kill app function isn't working. If I try to kill the app, wait, and Open App (with the always open new copy), it doesn't kill the app and opens the old instance of the app. I've tried the suggested workaround that I found here to go home first and then kill the app, and that doesn't work either.

Reason I need to kill the app and reopen sometimes is to satisfy a scenario I've created with AutoInput, where it expects you to be on the starting page of the app, so if the app was left running in the background not on the start page, then I want to be able to open it fresh to the start page.

I'd like a better solution, but the ugly workaround I have in place currently is to:
  1. Open the app
  2. Run AutoInput UI Query to determine if it's on the home page (not all that reliable)
  3. If it isn't on the home page, then
  4. open recent tabs
  5. Use swipe gesture with click function on the x to close the app
  6. then launch the app with tasker
It's ugly, but it works. However, it seems like the kill app and always open new copy should be working, but they aren't.

Rich D

unread,
Apr 21, 2018, 6:54:08 AM4/21/18
to Tasker Google Groups Post

Running stock Nexus 6P here with Android 8.1 and the kill app function isn't working. If I try to kill the app, wait, and Open App (with the always open new copy), it doesn't kill the app and opens the old instance of the app. I've tried the suggested workaround that I found here to go home first and then kill the app, and that doesn't work either.

To kill a app you need root. The best non root option is to use the 'go  home' action.
Unfortunately the 'always start new copy'  has  never worked on all apps. I am not sure if João could look at this and get it working better but I have found I can 'start a new copy'  of most apps by using a intent to start the app then adding the proper flags to the intent. I had a very hard time with quickpics. But was able to get it working using these flags. 

--activity-clear-task --activity-clear-top

But there are others you can try as well. I believe it all depends on how the app is built. 

 Tasker's 'send intent' action does not allow flags so  You can use intenttask plug in or autoshare to build Intents with flags. 



João Dias

unread,
Apr 23, 2018, 4:43:01 AM4/23/18
to tas...@googlegroups.com
Thanks for the report.

Can you give me an example of an app that doesn't work well with the 'always start new copy' option?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

joaomgcd

unread,
Apr 23, 2018, 1:30:37 PM4/23/18
to Tasker
Ok, was able to fix it for next release, thanks :)

Rich D

unread,
Apr 23, 2018, 8:56:34 PM4/23/18
to Tasker Google Groups Post

Ok, was able to fix it for next release, thanks :)

Great.. Thank you...

To answer your previous question, QuickPic  is a app that is particularly hard to start a new copy of. 

Anthony C

unread,
Apr 24, 2018, 9:12:14 AM4/24/18
to Tasker
I haven't been able to get it to work with any app. Two of the apps I've had trouble with though are Xfinity Home and Google Fi.

João Dias

unread,
Apr 24, 2018, 1:10:21 PM4/24/18
to tas...@googlegroups.com
Yes, should be fixed for next release :)

On Tue, Apr 24, 2018 at 2:12 PM, Anthony C <ajcaste...@gmail.com> wrote:
I haven't been able to get it to work with any app. Two of the apps I've had trouble with though are Xfinity Home and Google Fi.
Reply all
Reply to author
Forward
0 new messages