~/talk

Controlling Android Sound

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [android]
name:Nishimy
links:none on file
slides:none on file

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

  1. 0:00Introduction
  2. 0:44Android volume basics
  3. 7:26Volume terms and streams
  4. 13:30Audio library choices
  5. 16:49Silent mode
  6. 20:23Device volume differences
  7. 28:35Ringer mode differences
  8. 32:48Volume control best practices
  9. 33:53Summary & Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.