Re: Killing an app not working

3,267 views
Skip to first unread message

J.

unread,
Jan 12, 2013, 10:13:20 AM1/12/13
to tas...@googlegroups.com
On Saturday, January 12, 2013 6:06:53 AM UTC-5, Richard Åsberg wrote:
> I created a profile that will start Spotify whenever I connect my BT Stereo headset and it's working great but I then would like Tasker to also close/kill Spotify when I disconnect the BT Stereo headset. I tried both to use an exit task using the invert feature with the Bluetooth Connected function and I also tried making a separate profile using the same invert Bluetooth Connected function but none of these methods worked.
>  
> Is there any way to accomplish this?

the problem is android, not Tasker. Android restricts 3rd party programs from closing others. you can try:

-'kill App' with 'use root' checked (if you're rooted of course)
-you *may* be able to use a combo of Dpad commands to simulate input for exiting Spotify
-use the Tasker plug 'Taskkill' - nothing worked for me to close Waze, until I tried this. Look for it in the market..

Cliff

unread,
Jan 15, 2014, 12:53:56 PM1/15/14
to tas...@googlegroups.com
I had the same problem when trying to kill Podcast Addict when disconnecting from my car bluetooth.  I found that inserting a 10 second wait (possibly less, I didn't test) as my first exit task, before killing the app, solved the problem.  

My thought process was that Podcast addict was set to automatically pause the playback on headset disconnect, and this was working fine.  But... I think it was pausing the playback at the same time tasker was trying to kill it, so it was ignoring the kill request.  After adding the wait, it now behaves as intended.  I don't have any other explanation as to why it works with the wait and not without.

financia...@gmail.com

unread,
Jan 15, 2014, 2:16:29 PM1/15/14
to tas...@googlegroups.com
The problem is with Tasker, because Tasker is misleading users by including the "kill app" action. If it "kill app" does not work in Android, then Tasker should remove the action immediately.

financia...@gmail.com

unread,
Jan 15, 2014, 2:17:37 PM1/15/14
to tas...@googlegroups.com

Cliff

unread,
Jan 15, 2014, 6:06:57 PM1/15/14
to tas...@googlegroups.com
Well, I can only speak for my phone when I say that Tasker works as designed with the Kill App function, I just needed to insert a short wait after the bluetooth state change.  Wouldn't work before that.  I've used the function with both PodCast Addict and Waze and it terminates both apps after bluetooth disconnect.  I'm running KitKat on a stock (unrooted) Moto X.

I set up a profile to detect bluetooth connect with a task to vibrate the phone for .2 seconds, so I confirm the profile is active.  Then I created an exit task to 1) wait 10 seconds and 2) Kill app, Podcast Addict.  I didn't need any plugins, root permissions, or third party apps to do it.  Works every time, as designed.  

I don't know why people are saying that tasker is misleading, or android doesn't allow 3rd party apps to kill other apps.  I use Advanced Task Killer (manually) on a regular basis and it has no problems killing apps, and it's a third party app killing other apps...  Tasker is doing the same thing, and on my phone, works as designed.

Matt R

unread,
Jan 15, 2014, 6:20:40 PM1/15/14
to tas...@googlegroups.com
Semi-unrelated, but just FYI Cliff, there's a way to properly/cleanly close Waze with an intent: https://groups.google.com/d/topic/tasker/XmYLdTOMrJo/discussion

Matt
Reply all
Reply to author
Forward
0 new messages