The AudioManager
class has a method abandonAudioFocus()
and another method requestAudioFocus()
. I wonder what is audio focus? And what
You use audio focus when setting which app has the playback priority. For example, you can set up what should your app do when it's playing a audio file and some other app wants to take the focus and play something. If you do not set up what will happen it these cases, the other app will just play audio over yours. I've written a blog post about this: http://markojerkic.com/handling-audio-focus-in-android/