Omeya / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
0 stars 0 forks source link

Option to Pause BT Audio on Disconnect #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Slacker does a good job pausing audio when BT drops, but Pandora doesn't.  
Since Slacker keeps crashing on my phone, I've switched back to Pandora.

Pandora does not stop music, so, when I get out of my car, the music is still 
playing (albeit at a lower volume.)

I would like to see a "Pause Streaming Audio on Disconnect" option on the 
device screen. (Be able to set it by device.)  I can see situations where not 
everyone would want to do this, so I really think it needs to be an option to 
be effective.

Thanks.
-Todd

Original issue reported on code.google.com by todd...@gmail.com on 29 Jan 2012 at 5:40

GoogleCodeExporter commented 9 years ago
I will need to look into this more.  I'm not sure I can control Pandora like 
that.  If you use A2DP Volume to start Pandora it does try to stop it on 
disconnect.  Have you tried this or are you starting Pandora manually?

Original comment by JimR...@gmail.com on 30 Jan 2012 at 1:22

GoogleCodeExporter commented 9 years ago

Original comment by JimR...@gmail.com on 30 Jan 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Just tested it again, and it DOES pause the music when I use A2DP to connect.  
It might be that I had run it manually earlier and it didn't pause it because 
of that. I'll watch for it again to see if I can come up with a sequence of 
events that causes it to happen.

Can A2DP be set to shut down an app when it disconnects?  I'm not sure if that 
is what I want, though.  The problem is, there are a lot of different 
scenarios.  If I just stop to get gas, I would like it to pick up where it left 
off, but if I am home for the night, probably not.

I'll play with it some more and let you know if I come up with anything.

Thank you for the quick response.

Original comment by todd...@gmail.com on 30 Jan 2012 at 1:37

GoogleCodeExporter commented 9 years ago
A2DP Volume already tries to kill the apps it starts.  However, beginning with 
Froyo Android removed the ability for apps to kill each other.  It still tries 
but generally Android will just ignore it.  I don't use the app start feature 
much myself.  I also don't use Slacker or Pandora, although I did have Pandora 
installed for testing.  I have TuneIn Radio and I really like it but I don't 
tend to listen to it in the car.  TuneIn does not support shortcuts either so I 
can't have it start playing my favorite station automatically, yet.

Original comment by JimR...@gmail.com on 30 Jan 2012 at 1:54

GoogleCodeExporter commented 9 years ago
This is related to issue 48.  I posted a test version 2.4.0 in the downloads 
area that stops the music and kills the app on disconnect now.  Please test it 
and let me know how it goes.

Original comment by JimR...@gmail.com on 10 Feb 2012 at 1:46

GoogleCodeExporter commented 9 years ago
I implemented a pause on disconnect in 2.4.0.

Original comment by JimR...@gmail.com on 10 Feb 2012 at 2:35

GoogleCodeExporter commented 9 years ago
See also issue 48.  I am getting close with version 2.5.0 and up.  Please test 
and let me know how it goes.

Original comment by JimR...@gmail.com on 13 Feb 2012 at 1:19

GoogleCodeExporter commented 9 years ago
I missed 2.4.0.

I just downloaded 2.5.0 and turned off my headset while Pandora was playing. (I 
did have A2DP start Pandora.) Pandora was in the foreground, and it brought up 
my launcher and lowered the volume when I disconnected, but Pandora kept 
playing.

I did it again with Pandora in the background and that time, it paused the 
music.

I reconnected my headset and Pandora started back up, and started a new song.

I know I'm being pretty demanding, but ideally, I don't really want to start a 
new song every time I connect and disconnect BT.  For a couple of reasons.  
First, it takes Pandora FOREVER to buffer a new song.  Also, if I'm at my desk 
listening to a song, and then go out to the car, I'd like to be able to pick up 
with the same song in the car I was listening to in the Office. Or, if I stop 
for gas, it would be nice to be able to pick up where it left off.

I just disconnected and reconnected again.  This time, it didn't pause it.  So, 
I paused it manually.  Then I reconnected.  It brought Pandora up on the paused 
song, but did not start playback.

I really think my issues are with Pandora. I think it just does a bad job 
responding to BT commands.  Because I'm sitting here with Pandora in the 
foreground, and hitting the play/pause burtton on my headset and nothing is 
happening.

So, I'm probably not the best person to be testing this functionality.

Original comment by todd...@gmail.com on 13 Feb 2012 at 12:45

GoogleCodeExporter commented 9 years ago
I just switched back to Slacker. It works a lot better all the way around. It 
auto-pauses when BT dicsonnects, and it handles BT commands better.  The reason 
I switched to Pandora was because Slacker crashed sometimes. I'll deal with 
that for now.

Original comment by todd...@gmail.com on 13 Feb 2012 at 12:54

GoogleCodeExporter commented 9 years ago
I would close this issue but it relates to another enhancement I am planning.  
I want an option to not kill the launched app on disconnect but rather just 
pause.  Most apps will do this anyway so all you need to do is not supply the 
package name.  However, some don't.  I will look into this more before closing. 

Original comment by JimR...@gmail.com on 16 Feb 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Completed in version 2.5.1.

Original comment by JimR...@gmail.com on 20 Feb 2012 at 12:14

GoogleCodeExporter commented 9 years ago
See issue 105 for further fixes to this issue.

Original comment by JimR...@gmail.com on 25 Apr 2012 at 3:50

GoogleCodeExporter commented 9 years ago
OK, I think I finally got it working to stop Pandora.  Would appreciate if you 
could test 2.8.2 for me and let me know how it works.
Download here: 
http://code.google.com/p/a2dpvolume/downloads/detail?name=A2DPVolume2_8_2.apk

Original comment by JimR...@gmail.com on 28 Apr 2012 at 2:38

GoogleCodeExporter commented 9 years ago

Original comment by JimR...@gmail.com on 28 Apr 2012 at 2:39

GoogleCodeExporter commented 9 years ago
Hi,

I have a similar issue. I'm using Winamp and it looks like the behaviour is to 
stop on disconnect, whereas what would be better is for it to pause. Could this 
be a general option to just pause the track that's playing?

Original comment by ikwall...@gmail.com on 28 Apr 2012 at 10:28

GoogleCodeExporter commented 9 years ago
Many apps will do stop or pause on disconnect by themselves and I have no 
control over that.  The pause command in Android is a toggle.  If I try to 
pause it may actually un-pause and start the music playing again.  Make sure 
you uncheck the "stop app on disconnect" in the device settings if you don't 
want the app killed.  When you connect again you should be able to just hit 
play and most music players will start from the the last song.  

Original comment by JimR...@gmail.com on 28 Apr 2012 at 11:43

GoogleCodeExporter commented 9 years ago
OK thanks. I'll try out a few other music apps then

Original comment by ikwall...@gmail.com on 29 Apr 2012 at 7:36

GoogleCodeExporter commented 9 years ago
I know this isn't your problem, but you might be able to help me out: I 
discovered that the default HTC Sense music app did what I wanted to, but since 
then I've rooted and flashed CM9 which has the stock Android music app from ICS 
which doesn't seem to play nicely with pause / unpause. Can you (or anyone else 
subscribed to this issue) recommend a music app which automatically plays on 
connect and *pauses* (not stops) on disconnect?

Original comment by ikwall...@gmail.com on 10 May 2012 at 9:30

GoogleCodeExporter commented 9 years ago
I use Amazon MP3 and Google Music.  Both can play your own music as well as the 
cloud music.  Use A2DP Volume to launch them but then uncheck the "stop app on 
disconnect" feature.  Some players will work better if you use the "force app 
restart" and some will not.  You just need to experiment.  Actually the stock 
music app seems to work well for me too so its odd yours does not.  I wonder if 
there is a bug in that build of CM9 for your device.  It would be possible to 
add a toggle pause feature in A2DP Volume and that may work for you.  Are you 
using A2DP Volume 2.8.6?

Original comment by JimR...@gmail.com on 10 May 2012 at 10:33

GoogleCodeExporter commented 9 years ago
Yes, 2.8.6

Actually I hadn't set up A2DP Volume to launch Music on connect since I flashed 
CM, maybe that's the issue. Thanks!

Original comment by ikwall...@gmail.com on 10 May 2012 at 10:45