abertschi / ad-free

A modularized audio ad blocker for Android
https://abertschi.ch/blog/2022/building-adfree/
Apache License 2.0
277 stars 19 forks source link

Doesn't respond to volume control o android 10 #71

Open pietrasagh opened 4 years ago

pietrasagh commented 4 years ago

App doesn't react to system music volume control. It play music very loud. I Double checked with sound test in app.

abertschi commented 4 years ago

The app uses a different audio stream than the stream used for music on Android. System music volume has no impact on that stream. In the 'local music' plugin in ad-free you can adjust audio under 'audio volume'.

abertschi commented 4 years ago

Reopen if issue persists.

pietrasagh commented 4 years ago

At least in my phone button "audio volume" does nothing. My model is SM-A705FN/DS

abertschi commented 4 years ago

Okay, this seems like a device specific issue. To help fix the issue, you can capture device log with logcat and send me the logs. While capturing output, make sure to change 'audio volume' in ad-free. This may help to narrow down the issue. As the issue seems device specific, there is no other way I can investigate it without seeing device logs.

https://developer.android.com/studio/command-line/logcat

pietrasagh commented 4 years ago

Please find logs here. I hope I grabbed it correctly. I opened ad-free and clicked "audio volume" few times. https://drive.google.com/file/d/1aLOTWJaCqM38NYNLPeLYVJ-LlvbbIGXj/view?usp=drivesdk

abertschi commented 4 years ago

I am afraid, the output does not contain references to ad-free. You can try to collect more output and look for references to ad-free in the log. I.e. grep for 'adfree' and look for errors.

pietrasagh commented 4 years ago

Hi I reinstalled app. The "audio volume" button works only once. Later there's no reaction. I found out that app use ringtone channel. Even with with minimal value music volume in headphones is quite loud. It would be great to be able to set volume level (gain) additionally internally in app.

Best regards Piotr

Wysłano z aplikacji ProtonMail

-------- Oryginalna wiadomość -------- ‎ 4 lis 2020, 18:09, Andrin Bertschi napisał(a):

I am afraid, the output does not contain references to ad-free. You can try to collect more output and look for references of ad-free in the log. I.e. grep for 'adfree' and look for errors.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

abertschi commented 4 years ago

I reinstalled app. The "audio volume" button works only once. Later there's no reaction.

There is not much I can do with this description to fix the issue. As we have already established, it seems device specific. You could try to gather the requested log files. Additionally you could post a screen recording of the UI to show how the "button works only once".

The "audio volume" button currently requests the system UI levers for STREAM_VOICE_CALL and then fetches the value after a few seconds. During this period, the UI can be changed such that the changed value is stored.

https://github.com/abertschi/ad-free/blob/5ec673312a8cb3f242d0e7bb91cd340252d731d7/app/src/main/java/ch/abertschi/adfree/AudioController.kt#L59

Alternatively you can always use the 'mute' plugin of ad-free.

Cheers