Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to Audio Focus breaks playback pausing when ringtone is disabled #50

Open
timoreimann opened this issue Apr 21, 2012 · 0 comments

Comments

@timoreimann
Copy link
Contributor

With issue #8, the Android app switched to Audio Focus management. Unfortunately, the switch broke a piece of functionality which was brought to Subsonic as a patch by myself. It's all described on the Subsonic Sourceforge tracker; in a nutshell, it goes like this:

Prior to integration of the patch, when listening to Subsonic music via headphones with the ringtone disabled, the user would not be notified of an incoming call as the music would simply continue playing. The only way to get around the problem was to turn vibration on. However, in a busy situation or one where the phone wasn't available haptically it was easy to miss calls. (Happened to me several times.) That's why the patch was introduced to change behavior such that music would pause and allow the user to become aware of the incoming call.

Due to the modifications made in Supersonic along issue #8 there is no change of audio focus anymore, simply because a disabled ringtone doesn't constitute a change in audio focus. I made a couple of tests on my phone which confirm my findings.

One approach to fix this problem is to continue listening for a change of phone state in case where the ringtone is disabled and act accordingly. It's a shame that this will introduce some kind of multi-state listening to the application but I think it's still better than reverting back to the old code that lacked Audio Focus. (After all, using Audio Focus is a benefit.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant