Closed DBendit closed 12 years ago
I'm interested to see if this fixed an issue I've experienced with the app not giving back focus when nothing is playing.
It should. It explicitly releases focus on manual pause and stop (i.e. reset()). Plus, if something else requests focus while Subsonic has it, it pauses and hands it off gracefully, then starts playing when the other app releases focus. That's why we don't need to track phone state anymore.
While we're here, how are we going to handle pull requests? Should we all just comment with approve or what needs to be fixed?
Further, should I keep developing in my own fork? Or just kill it off after this merge and work in branches on this repo for now on?
I'm loading it up now on my Evo so i'll let you know if it fixes my issue.
I moved the project to the Mach5 organization from my personal repo to better organize the project within Github's infrastructure. You'll need to update your git remotes to the new url in your clone.
I added you as a collaborator so you can commit directly to the project and avoid your own project fork all together. I'm still forming the best known process that we should use but issues seems like a forum for consensus.
Thanks again and welcome aboard!
This pull requests affects #50.
Summary of changes:
Audio focus is now respected
When other apps grab Audio Focus (e.g. Phone.apk receives a call), playback pauses. When the interrupting app releases Audio Focus, playback resumes. Apps that support ducking (e.g. Navigation) lower volume to 10% while they have focus, then restore volume to 100% when they're done. See http://developer.android.com/training/managing-audio/audio-focus.html for details.
Minimum Android version increased
One of the downsides of using Audio Focus is that the minimum supporting version of Android is 2.2 (SDK version 8). According to http://developer.android.com/resources/dashboard/platform-versions.html, this excludes roughly 9.2% of Android users. However, this is the only way to support audio ducking in ICS. As such, I think this is an acceptable concession to make. (For the record, I have an ICS phone and no pre-2.2 phones, so I'm biased)
Event listener cleanup
Now that we're raising the minimum platform version, we can stop using reflection to access Audio Manager functionality. On top of that, Audio Focus has supplanted listening to phone events as the appropriate way to handle calls. This means that we no longer need to listen for calls to start and stop, and can also remove a permission from the app.