Best way to Force Stop Spotify

442 views
Skip to first unread message

Mark Mercier

unread,
Apr 6, 2018, 11:02:08 AM4/6/18
to Tasker
The problem: Spotify stops working with Android Auto in my VW GTI. It simply stops responding to my voice commands or pressing any buttons like play.
My workaround so far: Unplug my phone via usb> Go into Settings> Apps> Spotify> Force Stop then plug it back in and all is well. Until the next time.
I bought Tasker today to automate this process, but I'm not sure as to the best way to manage the task. I thought perhaps when my phone connects via Bluetooth to my car (VW GTI), have Tasker Force Stop on the Spotify app.
My questions for this group if you have a moment to help me and thank you in advance!
  1. How would I create this task?
  2. Do you think there is a better approach? what is it?

Thanks again all!


Mark

Robert Ryan

unread,
Apr 6, 2018, 11:56:57 AM4/6/18
to Tasker
This is the task I would use. Disclaimer: requires AutoShare and AutoInput.

Restart Spotify (84)

A1: Variable Set
Name: %package
To: com.spotify.music
Recurse Variables: Off
Do Maths: Off
Append: Off

A2: AutoShare
App: Android
Action: App Details Settings
Data: package:%package
Timeout (Seconds): 10

A3: AutoInput Action
Type: Text
Value: FORCE STOP
Action : Click
Timeout (Seconds): 20

A4: AutoInput Action
Type: Text
Value: OK
Action : Click
Timeout (Seconds): 20

A5: Wait
MS: 500
Seconds: 0
Minutes: 0
Hours: 0
Days: 0

A6: Launch App
App: Spotify
Exclude From Recent Apps: Off
Always Start New Copy: Off

Phobe Laxu

unread,
Apr 6, 2018, 6:01:36 PM4/6/18
to Tasker
Without going to detail, I'd try this:

1. get Secure Settings plugin
2. when it's time to stop Spotify --> use the "disable package" function in SecSet
3. when it's time to have it enabled again --> use the "enable package" function

The force stop might be "too harsh" on the app/package.

Robert Ryan

unread,
Apr 6, 2018, 6:22:46 PM4/6/18
to tas...@googlegroups.com
In what way is Force Stop "harsh" on an application? The Android OS provides this functionality specifically for these types of situations. 

How is the Secure Settings plugin less "harsh"? 

The term harsh is pretty vague in this context.
 

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/Iw1AYZnK2SI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Phobe Laxu

unread,
Apr 6, 2018, 6:53:34 PM4/6/18
to Tasker
disable package basically just pauses the app
if you enable it again it wll be in the same state as before (IIRC)

force close seems to be more extreme (I remember the TasKill plugin had like 3-4 "extreme" force close measures to choose from). I don't know any details but isn't it essentially like killing the process moreso than pausing it?

Robert Ryan

unread,
Apr 6, 2018, 11:13:01 PM4/6/18
to tas...@googlegroups.com
Both approaches have their pros and cons. I don’t think either method is necessarily better than the other. I was just curious about your wording. 

Personally, the AutoApps have long been my go to solution for everything. I have other plugins installed, but I rarely use them. 

Jimmy Jimmy

unread,
Apr 9, 2018, 3:15:17 AM4/9/18
to Tasker
I believe SS's disable package action requires root. So, if your phone is not rooted, you option is AutoInput. 
If your  phone is rooted, you can choose either one. Both good methods.

Robert Ryan

unread,
Apr 9, 2018, 8:31:15 AM4/9/18
to tas...@googlegroups.com

On April 9, 2018 1:15:23 AM Jimmy Jimmy <jmjc...@gmail.com> wrote:

> I believe SS's disable package action requires root.

It doesn't require root. However it does require the app be the device owner. Not only is this a very complicated procedure, it also gives the app complete, unregulated, access to all of the information on the device.

Reply all
Reply to author
Forward
0 new messages