jroal / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
http://jimroal.com/slist.htm
95 stars 33 forks source link

Volume looping #287

Closed TonyWillis123 closed 4 years ago

TonyWillis123 commented 4 years ago

App worked fine for a few weeks but now for no apparent reason after I start Spotify the volume goes up to 100% (as intended) then a few seconds later it reduces to 50% then it repeats the process - up/down, up/down, up/down etc. I have rebooted the phone (Nexus 6P) uninstalled /reinstalled the app to no effect.

jroal commented 4 years ago

There are a couple possible causes of this I can think of.

1) Android OS from version 9 handles the device specific volume adjustment. See this post: https://a2dpvolume.blogspot.com/2018/08/android-9-pie-makes-a2dp-volume.html . Try not using the volume adjustment feature in A2DP Volume and instead just set the volume where you want it after the device is connected. I will say that I have Android 9 and I still use A2DP Volume and it works fine without this issue. You can also try adding more delay to the volume adjustment in A2DP Volume. That is why the delay adjustment is there.

2) Another app is making these adjustments and fighting with A2DP Volume. There are many other apps that also make volume adjustments. Some OEM's have added volume adjustment features into the OS beyond Android, although your Nexus should not have this. It looks liek Spotify has its own volume management feature: https://support.spotify.com/us/using_spotify/system_settings/high-quality-streaming/

3) You have multiple devices connecting/disconnecting and configured in A2DP Volume to make the volume adjustment. Make sure you set it up so that you don't set multiple devices that may simultaneously connect both set the volume. For instance, in one of my cars I have a hands-free device, a separate A2DP device, and a Bluetooth keyboard. I have only the A2DP device adjust the media volume. I unchecked it for the other 2 devices in A2DP Volume device specific settings.

See also: Issue 280 and the Wiki.

TonyWillis123 commented 4 years ago

Hi Jim, Thanks for the quick reply. After I logged that help request I played around with the app and 'sort of' got it working OK. But I played with lots of settings and couldn't put my finger on what made the difference. The end result was it would raise the volume to 100% and keep it there but if you watch the screen you'll see that it does this every few seconds. But if you don't watch the screen you don't notice. After I saw your answer this morning I had another go and seem to have undone the good I'd previously done. I deleted all the devices except the one I'm interested in (CarAudioConnect FM) but TBH I'm confused by the interface. I have no idea what Car Dock does.

But the really puzzling thing is it worked perfectly for the first couple of weeks I used it and then for no apparent reason (but yes I know there has to be one, it's just not 'apparent') it stopped.

No need to reply to this, I'll just keep fiddling around till I find a combination that works. Once again thanks for responding. That's very admirable for a free app.'

Cheers, Tony

jroal commented 4 years ago

Car Mode or Car Dock is a feature in Android that changes the launcher to optimize it for operating while driving. I added support for 4 virtual devices in A2DP Volume, one being Car Mode (a.k.a. Car Dock). The others are Home Dock and Power Connection, and Audio Jack. These are not Bluetooth devices but status or modes of the operating system. I made these so you can also set up actions based on them. If you don't want to have one of them, go to the preferences and disable them. I also added a feature that will launch Car Mode when a Bluetooth device is connected which shows up in the edit device screen. This feature will invoke Car Mode in the OS.

The manual is here: https://github.com/jroal/a2dpvolume/wiki/Manual. It attempts to explain all of this. There is also the Wiki which has other helpful tips and information.

It sounds like you have created some sort of loop on your device. A2DP Volume does not have any periodic tasks. It only responds to events such as devices connecting and disconnecting and then does stuff. It does not constantly do stuff. Some change is being driven from something on your device that must keep triggering A2DP Volume to do stuff (if it is actually A2DP Volume even doing that). There are many other apps and OS features that also adjust volumes. Have you tried stopping A2DP Volume and then observe the behavior? Have you tried just letting the OS manage the volume?