austgl / a2dpvolume

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

Add delay option to "Also connect to bluetooth device" #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Unfortunately my car BT adapter is one that has issues when connecting to a 
device that has the phone audio option turned off in Android. I love the 
feature to auto connect to a device when it detects a connection. It detects 
the initial connection request from the adapter and then forces Android to 
automatically fully connect to the adapter, even with only the media stream 
selected. With the way my adapter works, it is very inconsistent though. It 
seems that the delay before it tries to force the connection is set at a too 
low of a value to work 100% of the time for my adapter. I think when my adapter 
is trying to establish the initial connection, it doesn't detect the forced 
connection from Android. An option for an added delay before this forced 
connection would take care of this, because I could just tune it to force the 
connection after my adapter has left this initial connection mode.

BT adapter - Soundfly GBT-100
Android version - Gingerbread 2.3.6
Phone - Droid Charge from Verizon (rooted with custom ROM)

Great app by the way. Way more consistent than any setup I tried in tasker, and 
I tried quite a few. (although I still use that app for other things).

Original issue reported on code.google.com by Aaron4T...@gmail.com on 2 May 2013 at 1:17

GoogleCodeExporter commented 9 years ago
It actually tries to force connect every 7s for 21s.  You can see the code here:
http://code.google.com/p/a2dpvolume/source/browse/src/a2dp/Vol/service.java#579
I just built a new version for you to test.  All I did was change 21000ms to 
49000ms (49 seconds).  Give that a try and let me know if this solves your 
problems.

Original comment by JimR...@gmail.com on 3 May 2013 at 2:51

Attachments:

GoogleCodeExporter commented 9 years ago
Actually that explains the issue I was having then. I have tasker set to 
disable bluebooth after 15 seconds upon disconnect (with a variable set to only 
turn it off only after 15 seconds after the initial connection, the variable 
set due to the fact that the phone will actually detect a disconnect 
immediately after the initial connection). The only reason I have tasker set to 
do this is because I couldn't find an option to do this in A2DP Volume. I guess 
that could be another feature request. Regardless, I will change the disconnect 
timeout in tasker to 30 seconds and report back. Thanks again for an awesome 
app!

Original comment by Aaron4T...@gmail.com on 3 May 2013 at 3:21

GoogleCodeExporter commented 9 years ago
Yes, that should be your problem then.  Often Bluetooth devices will connect, 
disconnect, and reconnect without seconds.  This makes it hard to handle.  I 
have had to put extra logic in this app to deal with that happening.  I have 
never used tasker so I don't know what you can do.  You need to see the 
disconnect but if you see a reconnect then cancel the action you started with 
the disconnect. 

I know many people say they like to keep Bluetooth OFF to save battery.  
However, newer devices have BLE (Bluetooth 4) and it hardy uses any battery 
when not actively sending/receiving data.  It is not worth turning OFF.   It 
also seem odd to want to use Bluetooth handsfree but have to turn it ON each 
time.  I never turn OFF Bluetooth.  Looking at battery usable is rarely makes 
into the top 5 battery drainers.  Usually below 2% of battery usage and my 
phone is an old Droid Bionic that does not have BLE.

A2DP Volume will likely only have a couple more releases to clean up a few 
things.  Then I am retiring it to replace it will a new app.  The new app will 
be focused on reducing driver distraction while allowing interactivity with the 
car.  Many of the features of A2DP Volume will be ported to the new app, and 
many new features will be added.  Since Jelly Bean 4.1 you no longer need this 
app to manage the volume.  Since 4.2 you don't even need it to launch an app.  
So calling it A2DP Volume makes no sense anymore.  I will leave A2DP Volume out 
there on the Play Store for quite a while and the open source project here will 
also remain.

Original comment by JimR...@gmail.com on 4 May 2013 at 1:23