jithware / brethap

https://jithware.github.io/brethap
GNU General Public License v3.0
50 stars 11 forks source link

[Feature Request]: Ignore Audio focus #111

Closed Laserlicht closed 10 months ago

Laserlicht commented 11 months ago

Is your feature request related to a problem? Please describe. It's not possible to play music with an external app in the background. As soon as brethap plays any sound the music app stops (Samsung S23, Android 14).

Describe the solution you'd like Option to ignore audio focus. For example the app "Metronome Beats" from playstore has this option and it's working after enabling (without it's the same problem).

jithware commented 11 months ago

Unfortunately I am not aware of any method to enable this within flutter's audio playing capabilities. A possible workaround when playing background audio in another app is to disable audio in brethap by selecting "None" in the Preferences for inhale and exhale and using vibration instead.

Laserlicht commented 11 months ago

I've absolutly no expirience in flutter.

But isn't it possible to use this library? https://pub.dev/packages/audio_session

jithware commented 11 months ago

I'm not familar with that package but sounds like it might do what you describe. Perhaps an opportunity for you to dive into dart/flutter? Feel free to give it a try and I'll take a look at your pull request.

Laserlicht commented 10 months ago

Found a solution for me: On samsung devices there is an app "sound assistent" where you can enable this functionality for special apps.