Controlling Android Sound
summary
Shows how to control Android audio using AudioManager, AudioAttributes, and AudioFocus and how to play sound with SoundPool, MediaPlayer, or AudioTrack. Presents tests on eight devices showing maximum stream volumes vary widely (7–32), so use AudioManager.getStreamMaxVolume and apply percentages rather than hardcoded numbers. Explains that changing ringer mode can throw SecurityException unless Notification Policy Access is granted (includes the settings intent), and recommends using adjustVolume or setStreamVolume while checking permissions.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:44Android volume basics
- 7:26Volume terms and streams
- 13:30Audio library choices
- 16:49Silent mode
- 20:23Device volume differences
- 28:35Ringer mode differences
- 32:48Volume control best practices
- 33:53Summary & Q&A
related talks
26mUnderstanding and Implementing Audio on Android
42mLet's make some noise with Android
16mUnderstanding and Implementing Audio on Android
40mAccessible audio: Android hearing aid support and the audio framework
36mSound Amplifier and the new Dynamics Processing Effect
40mState of Media Playback
33mVisualizing the Human Voice
38mAndroid Audio: Beyond Winning On It
