I'm trying to find a reliable way to pause/stop Pandora through Tasker and it's driving me batty.
Media Controls -> Pause -> Simulate Media Button works. The issue with it is that it doesn't work in a reliable timeframe. Sometimes it works within a second. Other times, it takes up to 2 minutes. I don't think Tasker is delaying the simulate button , I think Pandora is taking it's sweet time to process it, because if I pause Pandora manually, then it will eventually unpause, as though I sent a Toggle Pause instead of a Pause. If Pandora is already paused and the task triggers, it never unpauses, so that says to me that Pandora is receiving the button, but not immediately processing it.
Using a shell command to issue 'kill com.pandora.android' as root hotboots my phone, so that's out, and while Kill App -> Pandora works to stop the music, it leaves Pandora in a weird, half-running state where it's not actually running, but it still shows up in the notification shade.
Has anyone had any good experience with using the two together?
I have a backup profile here that turns pandora off "stops the apps process" when you unplug your headphones and auto starts pandora when you plug your headphones back in.
Keep in mind i set tasker to do this only for a headset without a mic, you can adjust the settings to your liking
Here is a link
you will need to download Secure Settings from the Market (play store)
Let me know what you think, ill re-upload the tasker backup if the link ever dies (just PM me)
Related
I moved from my vibrant that was on 2.1 where I had created a menu of music apps that came up when I plugged in headphones. I had an exit task that would kill music apps when I unplugged the headphones. It worked great.
Now on the NS my exit tasks don't work? I was reading that exit tasks don't work on 2.2 or higher. Anyway I was trying to figure if I could do anything to achieve the same effect?
Edit: Tasker total automation for Android http://tasker.dinglisch.net/
Edit 2: I understand that tasks cannot be killed by other apps in 2.3. What I am asking is if anyone knows how I can not hear any music when my headphones are unplugged. I could ask the maker of every music app I use to add this feature (unrealistic). I could set have tasker set the volume to zero (but then an app streaming music would still be chewing through my battery). Or I could just pull my phone out of my pocket and do it myself (why would I want to do that?).
task killer? if this it is, its bad http://androidspin.com/2010/05/25/why-you-dont-need-a-task-killer-app-with-android/
I understand what task killers are and do and that is NOT what I want.
What I want is to stop music from playing when I unplug my headphones.
Pandora has started doing this automatically but other apps do not. When they are running and I unplug headphones the sound then comes out of the speaker for all to hear. I have to manually turn them off by pressing pause or something. I don't want that, I want them closed.
Tasker used to allow exit tasks that would kill an app (not a task killer per say) depending on the context you set. In this case I have a context of Headset plugged that brings up a menu of apps I may want (Pandora, various other music players, Square, etc) I select what I want and it runs. What I want to have happen when the headset is unplugged is have any music player I may have turned on stop playing music but I can't do it the way I used to (exit task). I am looking for a new solution. I thought about just setting volume to zero but I don't think that is ideal.
I don't listen to music from my phone but I just tried out a song with headphones plugged in. I unplug it while its playing and it stops.
I'm using winamp + CM7 + netarchy kernel (voodoo sound)
probably a winamp or CM7 thing?
Edit: also stops on stock music app. probably CM7
Hmm. I'm on stock 2.3.3 and specifically tunein doesn't stop. I guess I could run cm7 but I still would like to find out if anyone has a tasker solution.
Contact the developer of the app and ask for Tasker support. Ask if it is possible to send an intent to the app to close it.
It's not an application issue it's a tasker issue. And it's something that worked in 2.1 or lower and cannot be made to work on 2.2 or higher (at least that's what I read). I'm looking for a new way of doing things....
this no longer works on android 2.2 and 2.3, so there is nothing anyone can do about it. certain apps can just not be killed anymore, in any way. only choice is to to live with it unfortunately.
joshthewaster said:
It's not an application issue it's a tasker issue. And it's something that worked in 2.1 or lower and cannot be made to work on 2.2 or higher (at least that's what I read).
Click to expand...
Click to collapse
It's an OS issue. Tasks can no longer be killed by other tasks.
Contact the developer of the app and ask for Tasker support.
Click to expand...
Click to collapse
See title.
I've tried turn by turn, but the music and voice directions are the same volume. They're drowned out.
I've switched from Android, and the way it worked with Google navigation is as follows:
Music is playing -> Music Paused -> "Turn Right on X St" -> Music resumes
Do any apps have that option? I'm interested in Navigon, specifically.
Thanks for any help!
Don't know about any thrid-party ones, but the built-in navigation feature works like that.
However, it doesn't give instructions automatically; you have to tap it when you want directions for the next leg of the trip. Some (few) people like this, many find it annoying and/or unusably impractical.
GoodDayToDie said:
Don't know about any thrid-party ones, but the built-in navigation feature works like that.
However, it doesn't give instructions automatically; you have to tap it when you want directions for the next leg of the trip. Some (few) people like this, many find it annoying and/or unusably impractical.
Click to expand...
Click to collapse
Yeah, that's just not very useful :/
For those who have Navigon: does it pause the music when getting audio directions?
I would really like something like this too. Poweramp on Android gives the ability to pause music on short audio focus change (like when voice navigation is active music is paused and then resumed). I have yet to find an app on WP7.5 that does this.
I know bing maps does it but that doesn't give automatic voice guidance.
Any help would be appreciated. It would be extremely useful for listening to music through a bluetooth car stereo whilst having the navigation on...it is hard to hear when the navigation voice is speaking if music is playing at the same time.
mikesnav said:
See title.
I've tried turn by turn, but the music and voice directions are the same volume. They're drowned out.
I've switched from Android, and the way it worked with Google navigation is as follows:
Music is playing -> Music Paused -> "Turn Right on X St" -> Music resumes
Do any apps have that option? I'm interested in Navigon, specifically.
Thanks for any help!
Click to expand...
Click to collapse
I've had an app that stopped/paused music fail certification for that very reason. If an app pauses or stops music, it must warn the user EACH TIME the app is loaded. Kind of silly, so I doubt any navigation apps out there pause the music.
I've Googled around and there doesn't seem to be many people with my particular, annoying issue: I just want my phone to stop playing music/media when I undock it from my iBolt car dock. I use CarDockV3 as my dock program.
I am trying to stay away from Tasker a bit, but I'll switch to it if it has the option and works better. I am using Llama right now combined with Media Utilities. I create a shortcut to the pause option, and have Llama set up to activate it when undocked. However, this only SOMETIMES works, and with a really long delay. Ie., a good 10-15 seconds after undocking, does the music stop, and only sometimes. I tried using a Bluetooth disconnect state but this seems to work even less frequently...
I just wish Android would detect undocking and force stop any media. This just seems like such an obvious functionality.
Hitting various media controls on my smartwatch (previously Pebble, now Android Wear both via built-in media functions and Music Boss), my Bluetooth car stereo, or the lock screen, including play/pause, next, and back (or even turning off my car which should automatically pause playback) is incredibly unreliable for me.
I find that at MOST, half the time these buttons work as they're supposed to. The rest of the time there's a delay ranging from a couple of seconds to over a MINUTE. And they accumulate, so I can hit next, not hear any change, hit next again, and then a minute later my music will skip two tracks. Or I hit pause, think it didn't work, hit it again, give up, go to my app directly, pause it, and 30 seconds later it plays again, then pauses.
I find pretty much the only thing that tends to clear this up is restarting my phone, which is usually not convenient to do at the times I need this to work most (like while driving).
I didn't have this problem at all with Jelly Bean on my Nexus 4, and I feel like the problem was rare, if at all, on my 5 with 4.4 through 4.4.2. It was 4.4.3 that seemed to make it a severe and constant problem, and it's held through 4.4.4. And as noted, the problem transitioned from my Pebble to my Android Wear, and since the same thing happens with lockscreen controls, I feel confident it's my phone/OS and not the watch. I'm stock, rooted, FYI.
Any thoughts? I've done a ton of Googling and gotten surprisingly nowhere.
I've noticed this too. For me it seems to have started happen after I got my Android Wear watch, and didn't happen when I just had the phone connected to my car bluetooth. I wonder if having the phone connected to multiple bluetooth controllers at once is causing the issue ?
Interesting thought. Might explain why I was also experiencing it with my Pebble.
Tested this theory by connecting my car stereo through the aux jack instead of Bluetooth and disconnected my phone from its Bluetooth connection. No improvement. At first it was responding right away, which it does sometimes, and then the next time I tried to use it it took a good 30 seconds before my actions registered.
This has been happening to me for a few months. I find that the only reliable way to immediately adjust the playback controls is from within the app. Lockscreen, Bluetooth devices, notification controls, corded play/pause via headphones are all unreliable. But the attempts to play pause are all cumulative and with the aforementioned lag, even if I successfully pause from within the app. So I think I've paused the player, but a minute later it may start playing again. Really embarrassing at times. Not rooted, and switching default players hasn't helped.
Socold said:
This has been happening to me for a few months. I find that the only reliable way to immediately adjust the playback controls is from within the app. Lockscreen, Bluetooth devices, notification controls, corded play/pause via headphones are all unreliable. But the attempts to play pause are all cumulative and with the aforementioned lag, even if I successfully pause from within the app. So I think I've paused the player, but a minute later it may start playing again. Really embarrassing at times. Not rooted, and switching default players hasn't helped.
Click to expand...
Click to collapse
Glad I'm not alone, although disappointed you don't have a solution either. And yes, it's very embarrassing to try to show off this technology and have it fail, or worse have it fail at the wrong moment. Sometimes I get out of my car, walk into a building, and THEN the commands catch up and the music starts blaring from my pocket. Good thing I don't listen to Gangsta Rap.
I should have posted my app in here a long time ago. But I guess it is never too late to post it and hope for some good feedback on how to improve the app even further.
What does SleepTimer do:
It simply gives you a way of stopping your music after x minutes. Set it, and listen to music (or a video) in the evening without having to worry about the music running at 3am and waking you up from your sleep. SleepTimer lets you even do more like turning off wifi and/or mobile data after it turned off the music so you do not get interrupted by those annoying WhatsApp messages .
Scenarios
1. Turning off music after falling asleep
2. Turning off remote music like iTunes Remote, YouTube over ChromeCast, ... (needs some configuration)
3. Like fall asleep while talking with your love but hate high phone bills? Let SleepTimer stop the phone call (needs some configuration)
For most use cases SleepTimer just works. Open it up, set time, start. Done. And it even looks nice (at least I think so).
Only like 6% of the apps need some additional configuration to make them work.
More details (only for those who want to know/read more)
The app uses many different techniques to turn off the music. Audio controls, audio foreground, and even notifications since the newest version. Sadly there are some really bad music players out there that do not support any way of stopping their music except for opening the app and using the stop button in there. In such cases there is only the way of lowering the volume (which I hate ). I hope those developers get to work and implement a proper Music Player. Luckily most apps work though.
About notifications (new since October 2014)
This I am actually pretty proud about and took me a while to implement. And it gives us two new features.
1. Stop music using the notification
So if they have a pause/stop/close control in the notifcation, one can add a custom action in settings, select the app and click on the button in the notification that stops the music. SleepTimer will then use that button in the notification to stop the music. That allows more ways to stop an app and allows to stop apps like iTunes Remote, YouTube with ChromeCast, ...
2. Wait until the end of a track
If enabled, SleepTimer will not turn off the music immediately but wait until the track ends. This is done using the text content of the notification. As soon as the text in a notification changes SleepTimer knows that the track is changing and it will send a stop request immediately. (As well it ignores numbers like 3:12 which is obviously not track information but time information)
Shake extend
If enabled, you can extend the timer by shaking your phone. So you can set some quiet chime to run one minute before the timer runs out. If you can still hear it then just shake to phone to extend the timer.
Root
One can enable root in advanced settings to have even more options when the timer ends. For example turning off the phone or turning on airplane mode.
I hope you do like the app. If not, let me know why. If you have any recommendations or questions, please just ask. As well any ideas how to improve the app further are welcome.
Cheers,
Patrick
First.
Does it support all music & video players? Or only stock players?
exodius48 said:
First.
Does it support all music & video players? Or only stock players?
Click to expand...
Click to collapse
It supports a lot of music and video players. Basically all of them that support the events of Android that good Audio Player apps should support according to Google Many players I tested (Stock, Google Play Music, TuneIn, Spotify, YouTube, ...) worked. And even if they don't work by default, try out adding a custom action in settings in on sleep actions.
Is is possible to turn off the device after x minutes?
Kuri93 said:
Is is possible to turn off the device after x minutes?
Click to expand...
Click to collapse
Yes it is. But only if you have a rooted phone. If you do, then enable root in the advanced settings and then go into the On Sleep Actions settings where you will find the turn off phone option .
I think it would be great idea to add some notification with countdown(few seconds), before phone shutting down.
This is a really neat app! All the other sleep timers I tried didn't feature root options like airplane mode etc. Thanks a lot!
Just a little request: Could you add a screen off option as well? I mean sure, the device will turn off the display afterwards by itself, but I thought it might be useful.
Continuous sleep mode
Hi
I would like to know if the app can be configured so that if I fall asleep with earphones on and wake up and press the play/stop button on the earphones, theaudio I was listening to continues, but is automatically in sleep countdown mode without having to start Sleep Timer again.
This is the way the sleep mode in Smart Audiobooks works and it is very nice.
Thanks.