austgl / a2dpvolume

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

attempt reconnect after x seconds #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
phone: galaxy nexus
android version: ics 4.0.3

I am trying to use this program to automatically connect to an a2dp device in 
my car whenever it connects to the main bluetooth console (Blue&me) for calls, 
but I think a2dpvolume is trying to connect to the a2dp device before the 
device is actually available to accept a connection. I think it takes 5 or more 
seconds for the a2dp device to boot up properly and accept connections. I can 
manually connect to the device in the android bluetooth settings, but 
a2dpvolume doesn't automatically connect to it. As a side note, the phone 
automatically connects to the main bluetooth console (Blue&me) with no issues.

My request is that a2dpvolume have an option to attempt a reconnect to the a2dp 
device after 5 or 10 seconds. For example, I have a2dpvolume set to connect to 
the a2dp device when Blue&me is connected, but this doesn't happen. If 
a2dpvolume kept trying for an additional 5 or 10 seconds, it would successfully 
connect and it wouldn't be neccesary to manually connect from the android 
settings menu. 

Let me know if I can help figure this out in any way. Thanks!

Original issue reported on code.google.com by bryanaba...@gmail.com on 25 Jan 2012 at 8:16

GoogleCodeExporter commented 9 years ago
This looks like a reasonable request.  I can see the use case.  Thanks for the 
post.  I will work it into a future release (hopefully soon).  Maybe I will 
just add multiple retries.  I can watch to see if the connect was successful.  
If not, wait 5s and retry.  Do this 3 times before giving up.  That would give 
the 2nd device up to 15s to be ready.  I think this would address your issue?

Original comment by JimR...@gmail.com on 27 Jan 2012 at 12:37

GoogleCodeExporter commented 9 years ago
That would definitely address the issue! Automatic retry up to 15 seconds would 
for sure be enough. Thanks and I look forward to this feature! 

Original comment by bryanaba...@gmail.com on 27 Jan 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Fixed in 2.3.15 now ready for test in the downloads area of this site.  Please 
test and report and bugs or issues back here.  Thanks.

Original comment by JimR...@gmail.com on 27 Jan 2012 at 1:36

GoogleCodeExporter commented 9 years ago
I implemented a retry timer.  It retries every 7 seconds and expires after 21 
seconds.  This gives a total of 4 connection attempts.

Original comment by JimR...@gmail.com on 27 Jan 2012 at 1:38

GoogleCodeExporter commented 9 years ago
Just tested and it works great. Connected on the first retry. Thanks so much 
for doing this! This is the only program with this feature. I would have 
thought android would auto-connect all bluetooth devices by now but this is 
great work around.

Original comment by bryanaba...@gmail.com on 27 Jan 2012 at 5:54

GoogleCodeExporter commented 9 years ago

Original comment by JimR...@gmail.com on 27 Jan 2012 at 11:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 938704a0b387.

Original comment by JimR...@gmail.com on 27 Jan 2012 at 11:59