adrcotfas / Goodtime

:hourglass_flowing_sand: productivity app for Android
Apache License 2.0
960 stars 113 forks source link

Headphone sound rule is ignored #270

Closed jmonroynieto closed 1 year ago

jmonroynieto commented 2 years ago

The feature added in commit 5c89bd10c667210464db0f6371bddabbf12d5a9f works great typically, but I have changed my phone, and it seems that the connection is ignored unless there is something already playing.

I have no other devices connected; they are shown to be used for calls and audio in the Bluetooth settings. I've tested: Aftershokz Aeropex and SkullCandy Sesh Evo

Goodtime v2.5.2

I'm not sure how to further troubleshoot or document this issue. android 11 on a Samsung A42 5G

jmonroynieto commented 2 years ago

After thinking about it and a lot of googling, I uncovered the following from ADB output dumpsys audio

   [DeviceInfo: type:0x80 (bt_a2dp) name:Sesh Evo addr:XXXXXXcodec: 4000000]
    [DeviceInfo: type:0x20 (bt_sco_hs) name:Sesh Evo addr:XXXXXXcodec: 0]
    [DeviceInfo: type:0x80000008 (bt_sco_hs) name:Sesh Evo addr:XXXXXXcodec: 0]
    [DeviceInfo: type:0x10 (bt_sco) name:Aeropex by AfterShokz addr:XXXXXX codec: 0]
    [DeviceInfo: type:0x80000008 (bt_sco_hs) name:Aeropex by AfterShokz addr:XXXXXXcodec: 0]
    [DeviceInfo: type:0x80 (bt_a2dp) name:Aeropex by AfterShokz addr:XXXXXX codec: 1f200000]

could this mean that TYPE_BLUETOOTH_SCO is not catching my headphones?

adrcotfas commented 2 years ago

Thanks for your feedback! I'll investigate this soon.

jmonroynieto commented 1 year ago

I'm closing this for now. I think it has to do with a global toggle in Samsung's one UI which is accessible through Sound Assistant > Settings > Advanced settings > Alerts through headphones.