Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / docs / sound-haptics-audit.md

sound-haptics-audit.md22.1 KiBRenderedCodeRaw

Sound & Haptics Audit — Modern-Apps

Read-only audit, 2026-12-01, worktree wt-sound-audit (branch agent-sound-audit, HEAD 8eb187ecd). Scope: all Gradle app modules in root AGENTS.md/settings.gradle.kts + library/ui, sdk/games. No app code changed.

Candidates: 56 — high 23, medium 26, low 7.

Existing infrastructure today

  • Shared haptics (the one shared helper that exists): library/ui/.../Haptics.kt — rememberHaptics() wrapping LocalHapticFeedback with named longPress()/keyPress()/tick()/confirm()/reject(). Adopted in calculator, communicate DialPad, keyboard (KeyHaptics.kt), launcher drag, maps chips/dropdowns, todo, games chess/minesweeper/nonogram/logicgate, notes/weather/youpipe (raw LocalHapticFeedback SegmentFrequentTick/Gesture drag patterns), camera (CameraScreen.kt:64 posts HapticFeedbackConstants.CLOCK_TICK for shutter — haptic only, no sound), clock (ClockScreen.kt SegmentFrequentTick/Gesture).
  • Full sound+vibration services (reference patterns): clock AlarmSoundService (MediaPlayer ringtone, RingtoneManager.TYPE_ALARM, waveform vibration, per-alarm vibrate pref KEY_DEFAULT_VIBRATE); health DoseSoundService + MedicationChannels (channel defers sound/vibration to the service); communicate CallRinger (MediaPlayer + ToneGenerator call-waiting, ring vibration via USAGE_RINGTONE, respects ringer mode via RingEnvironmentReader); emergency SosSound/SosCountdownService (ToneGenerator alarm stream); clock-wear WearRingActivity.
  • Only synthesised game SFX: voxels platform/SoundFx.kt — SoundPool over WAVs generated at runtime by code synthesis (break/place/hurt/eat/explode/steps/cave/stalk), sfxVolume in GameSettings/SettingsSheet. This conflicts with the owner's new asset preference (see below).
  • Keyboard: KeyboardPrefs (kb_haptic=true, kb_sound=false) + AudioManager.playSoundEffect(FX_KEYPRESS_STANDARD) — the model per-app settings pair.
  • Ringtone picking: shared library/ui/RingtonePicker.kt; used by clock alarms, contacts per-contact ringtone.
  • Notifications as sound: findfamily per-person arrival/departure/no-show channels (FindFamilyNotificationChannels, IMPORTANCE_HIGH, system-tunable), communicate conversation channels. Several foreground-service channels deliberately setSound(null)/enableVibration(false) because a service/ringer owns sound — correct only where that owner exists.
  • Settings today: per-app only — clock alarm vibrate+ringtone, voxels sfxVolume, keyboard haptic/sound, measure measure_haptics. No global sound/haptics toggle, no shared SFX player, no sound assets anywhere (res/raw empty repo-wide; only voxels music .ogg assets exist).
  • In-flight (do not duplicate): minesweeper explosion (wt-mines-sound: ExplosionSoundPlayer in MinesweeperViewModel, gated by ringer mode, no toggle yet); camera shutter sound (separate agent, owner-confirmed should-have).
  • Permissions: VIBRATE declared in calculator, clock, communicate, emergency, health, games/hub, clock-wear. Any new vibration in other apps needs it added.

Candidates

#AppScreen / action (file)Trigger momentTypeSuggested characterPriorityJustification
1cameraCameraScreen.kt / CameraPhotoCapture.kt (shutterFeedback)Photo captured (incl. volume-key shutter, burst, timer self-shot)Bothshutter click (real asset) + short tick haptichighOwner-confirmed should-have; capture moment is currently visual-only flash. IN-FLIGHT: separate agent implementing.
2cameraCameraScreen.kt video modesVideo record start / stopBothstart beep + stop double-beep; confirm haptichighRecording state must be confirmable without looking at the red dot.
3cameraCameraScreen.kt timer modeShutter-timer countdown last 3s / final shotSFXcountdown ticks, final shuttermediumLets subject pose without watching screen.
4clockplatform/TimerReciever.kt + TimerPage.ktTimer expiresBothtimer alarm (user ringtone) + repeating vibrationhighA timer that only posts a notification is missable; alarms already ring via AlarmSoundService, timers should match.
5clockui/StopwatchScreen.kt (addLap)Lap recorded; start/pauseVibrationlap: segment tick; start/pause: confirm/reject hapticmediumEyes-free lap timing is the stopwatch's main use case.
6clockui/AlarmPage.ktAlarm fires (existing AlarmSoundService)BothEXISTING: ringtone MediaPlayer + waveform vibrationhighAlready implemented well — keep as reference pattern, no change.
7communicatetelephony/CallRinger.ktIncoming call / call waitingBothEXISTING: ringtone + ToneGenerator call-waiting + ring vibrationhighAlready implemented; respects ringer mode via RingEnvironmentReader. Reference pattern.
8communicateui chat thread (Conversation/Message compose)Message sent; message received while thread openBothsent: soft swoosh/pop; received: gentle blip; confirm haptic on sendhighIM affordance users expect; distinguishes own send from arrival without looking.
9communicateui/call/InAppCallScreen.ktCall connected / ended / muted / hold; DTMF keys (DialPad.kt)Bothconnect chime, end tone, key DTMF tones; tick haptics (DialPad already has rememberHaptics)mediumCall state changes are often eyes-free (phone to ear).
10communicatenotifications/ConversationSpace.ktNew message notificationBothEXISTING channel IMPORTANCE_HIGH; verify sound/vibration defaults not silencedmediumSeveral services setSound(null)/enableVibration(false) for foreground channels — audit each is compensated by a ringer, not silent overall.
11games/minesweeperui/components/MineFieldGrid.kt + MinesweeperViewModelMine hit (explosion); win; flag place/remove; first revealBothexplosion asset; win fanfare; flag tickhighExplosion IN-FLIGHT (wt-mines-sound, ExplosionSoundPlayer, ringer-mode gated). Win/flag are the remaining gaps.
12games/voxelsplatform/SoundFx.kt + MusicFxBreak/place/hurt/eat/explode/steps/caveSFXEXISTING but runtime-synthesised WAVshighOnly game with SFX today. Owner preference is real locally-generated asset files over code synthesis — migrate generated WAVs to committed assets; keep sfxVolume setting.
13games/hubui/components/AchievementRow.kt + sdk/games Models.ktAchievement unlocked / level-up / XP tier upBothsuccess chime / level-up arpeggio + confirm haptichighUnlocks are the hub's reward moment; currently silent. sdk/games syncAchievementProgress is the trigger point.
14games/chessBoardGrid.kt (already rememberHaptics)Move, capture, check, checkmate/stalemate, illegal moveBothmove click, capture thud, check alert, game-end motif; reject haptic on illegalhighBoard-game turn feedback; capture/check are information, not decoration.
15games/solitaireui/DraggableCard.kt, DropTarget.kt, FoundationSlot.ktCard pickup/drop, invalid drop, foundation complete, winBothcard slide/flip, reject buzz on invalid, win cascade chimehighDrag validity is currently purely visual; win is a headline moment.
16games/sudokuui/GameScreen.kt / GameBoardScreen.ktCorrect entry, wrong entry, puzzle complete, hint usedBothsoft pencil tick, error buzz + reject haptic, success chimemediumWrong-entry feedback speeds play; must be subtle to avoid punishing.
17games/nonogramui/components/NonogramBoard.kt (already rememberHaptics)Cell fill/mark, mistake, row/column complete, puzzle completeBothfill tick, error buzz, line-complete sweep, win chimemediumLine completion is satisfying and currently unmarked.
18games/pipesui/GameBoard.ktPipe rotate, connection completed, level solvedSFX+Brotate click, flow-complete rising tone, win chime; tick hapticmediumConnection completion is the core reward loop.
19games/logicgateui/GameScreen.kt/CircuitCanvas.kt (already rememberHaptics)Gate placed, wire connected, circuit output correct/wrong, level completeBothplace click, power-on hum blip, error buzz, success chimemediumCorrect-output moment teaches; should feel like power flowing.
20games/arrowsui/components/ArrowsBoard.ktArrow slide, blocked move, puzzle solvedBothslide swish, blocked thud+reject, win chimemediumBlocked vs moved is not distinguishable by feel today.
21games/unblockjamui/components/GameBlock.ktBlock slide, blocked, exit cleared, level winBothwood slide, thud, exit fanfaremediumSame slide/block distinction as arrows.
22games/wordmakerui/WordGameScreen.kt/WordGameOverlays.ktValid word, invalid word, letter placed, game over/win, turn change (competitive)Bothletter tick, error buzz, word-accept chime, turn alertmediumWord validity is the whole game loop.
23games/kartui/KartSurfaceView.kt/KartGameScreen.ktCountdown, lap, collision, finish, checkpointSFX3-2-1 beeps + go, lap chime, crash thud, finish motifhighRacing without audio loses speed/collision feedback; countdown beeps are accessibility-relevant.
24games (all)sdk/games + hubYour turn in turn-based/multiplayer (chess, wordmaker competitive)Bothturn alert blip + vibrationmediumPrevents stalled games; only when app backgrounded use notification channel.
25findfamilynotifications/FindFamilyNotificationChannels.kt (arrival/departure per-person channels)Family member arrives / departs a placeBotharrive: two-note chime; depart: falling tone; per-person channel sound/vibration already user-tunable in system settingshighCore promise of the app; channels exist (IMPORTANCE_HIGH) — verify default sound not null and add distinct arrive vs depart assets.
26findfamilynotifications (no-show channel)No-show alert (member didn't arrive)Bothalert tone + stronger vibration patternhighSafety-relevant; must cut through, distinct from routine arrival.
27findfamilyui map (MainMapSlot/PersonDetailSheet)UWB/distance: target in range; tracking lostVibrationproximity ticks speeding up; lost: reject patternmediumEyes-free finding (phone in pocket) is a real use case; UWB channel already HIGH.
28weatherweather alerts (HomePage/forecast)Severe weather alert issued for saved locationBothsevere-alert tone + distinct vibration; notification channelhighSafety-relevant and time-sensitive; routine forecast refresh must stay silent.
29weatherui/LocationsScreen.kt (already haptics)Location added/removed, refresh completeVibrationconfirm/reject via existing rememberHaptics patternlowDrag/reorder already ticks; completion confirm is cheap consistency.
30healthservice/DoseSoundService.ktMedication dose dueBothEXISTING: alarm ringtone + waveform vibrationhighAlready implemented — reference pattern; channels in MedicationChannels.kt correctly defer to service.
31healthui medication logDose marked taken / skipped; measurement savedVibrationconfirm haptic; soft success tick (SFX low)mediumLogging adherence should feel recorded; avoid alarm-like sounds for routine logs.
32todoui/TodoListScreen.kt (already rememberHaptics)Task completed (checkbox/swipe), un-complete, deleteBothcomplete: success tick/chime-lite; delete: reject-pattern haptic onlyhighCompletion is the app's reward moment; highest-frequency candidate in the suite.
33calendarevent reminder notifications; ui event editorReminder fires; event saved/deletedBothreminder: notification sound+vibration (channel); save: confirm hapticmediumReminders are missable if channel is silent; editor feedback is consistency.
34email / securemailcompose send; inboxMail sent; send failed; new-mail (background)Bothsent swoosh + confirm; failed: error buzz; background via notification channel onlymediumSend success/failure is frequently acted on without watching.
35filesui/DirectoryListing + dialogsDelete (permanent), move/copy complete, operation failedVibration (+SFX low)delete confirm: reject/confirm haptics; failure error buzzmediumDestructive-action weight should be felt; success SFX optional/low.
36photosui viewer/editorPhoto deleted, favourite toggled, edit applied, video playback startVibrationfavourite confirm tick; delete haptic; no SFX (media app, avoid competing audio)lowPhotos is a media surface; haptics only, respect audio focus.
37camera-adjacent: pdfui/CapturePdfScreen/CropScreenPage captured, OCR complete, export done/failedBothcapture shutter-lite click, success chime, error buzzmediumScan capture mirrors camera shutter expectation.
38measureui/LevelContent, CompassContent, ArMeasureContentLevel becomes level (0°), compass north lock, AR point placed/measurement completeBothlevel-lock tick/beep + confirm haptic; point-place tickhighEyes-on-the-object, not the screen: level-lock is the textbook haptic case. hapticsEnabled setting already exists (KEY_HAPTICS) — wire it consistently.
39tunerui/TuningMeter.ktNote enters in-tune band; string in tuneBothin-tune beep/chime (optional, toggleable) + confirm haptichighTuning is eyes-on-instrument; audible in-tune cue is the feature users ask tuners for. NOTE: no metronome exists in tuner today — a metronome (beat click + flash, accent first beat) is a new-feature candidate, flag separately.
40tuner (new)metronome (does not exist)Beat / accented downbeatSFXclick asset, accent higher clickmediumCommon tuner companion; scope as new feature, not feedback retrofit.
41music / youpipe / uniflixplayer screensTrack/video end, queue complete, download complete, playback errorVibration/notificationhaptics only in-player (never SFX over media); download-done notification soundlowNever compete with the media audio itself; audio-focus etiquette.
42flashcardsui study sessionCard flipped, answer correct/wrong, deck completed, streakBothflip tick, correct chime, wrong buzz, completion fanfare-litemediumStudy reward loop; wrong-answer must be gentle.
43educationui CoursePage/BadgesPage + Narrator (TTS exists)Lesson complete, badge earned, correct/wrong answer (K-2 audio-first shell)Bothsuccess fanfare, badge chime, gentle error; haptics confirmhighYoung learners: audio feedback is pedagogy, not polish. TTS Narrator already exists.
44calculatorui/CalculatorKeypad.kt (rememberHaptics) + widget (VibrationEffect EFFECT_TICK)Key press, equals, error (div/0)Vibration (SFX optional)key tick exists via haptics; equals confirm; error rejectlowAlready haptic'd; add only error reject + optional key click sound gated by setting.
45keyboardplatform/ime/KeyboardServiceEditOps.kt AudioManager.playSoundEffect + KeyboardPrefs (sound=false, haptic=true)Key press, delete repeat, space/swipe commitBothEXISTING: FXKEYPRESSSTANDARD gated by kbsound; haptics gated by kbhapticmediumAlready implemented with prefs — reference settings pattern. Default sound off is correct.
46launcherui/components/DragFeedback.kt (rememberHaptics)App launch, drag pickup/drop, folder open, uninstall drop targetVibrationlaunch tick, drop confirm, trash reject-patternmediumPickup/drop already haptic'd; launch tick is the missing beat.
47mapsnavigation (NavMapScreen/platform), ui CategoryChipsTurn instruction point, reroute, arrival, off-routeBothturn beep/voice-adjacent cue, arrival chime, off-route alert; vibration on turn approach (wear)highEyes-on-road: arrival and reroute must be non-visual. Wear turn vibration is high value.
48taxi / fooddelivery / shop / travel / globalesimorder & booking flows (CartScreen, CurrentRideScreen, ConfirmationPage)Order placed, driver assigned/arriving, payment success/fail, booking confirmed, delivery deliveredBothsuccess chime + confirm; payment fail error buzz; driver-arriving alert tone+vibrationhighMoney/state transitions users wait on with screen off; payment failure must not be silent.
49newsui/FeedScreen/ReaderScreenRefresh complete, breaking-news (if opted in), save articleVibration/notificationrefresh confirm tick only; breaking via channel if user opts inlowNews should default quiet; only opt-in breaking alerts.
50notesui/NotesListScreen.kt (haptics exist)Note saved, checklist item done, note deleted, ink stroke (tablet)Vibrationexisting drag ticks; add save confirm + checklist ticklowMostly covered; checklist tick is the gap.
51passwords / backup / everysync / vpn / euicc / updater / appstoreunlock, sync, connect, install flowsUnlock success/fail (biometric), sync complete/failed, VPN connected/disconnected, eSIM download done, update installed, app install completeBothunlock fail error buzz; sync/install success chime-lite + confirm; VPN connect/disconnect two-tonemediumSecurity/sync state changes are background-y; failure buzz on unlock is accessibility-relevant. Biometric prompt itself is system-owned — do not duplicate.
52emergencyplatform/SosSound.kt + SosCountdownServiceSOS countdown + SOS sentBothEXISTING: ToneGenerator alarm-stream + waveform vibrationhighAlready implemented deliberately — do not touch; reference for alarm-stream usage.
53setupwizard / parentalcontrols / screentimeFinishScreen; LockScreen; limit reachedSetup complete; device locked; app-limit reached blockBothcompletion chime; limit-reached: firm buzz + tone (child device)mediumLimit-reached is currently a visual screen a child can miss/ignore.
54share / cast / autoSharePopup, CastContent, auto AppScreenShare sent/failed, cast connected/disconnected, car connectionBothsent confirm, cast connect two-tone, disconnect falling tonemediumConnection state on another screen (TV) needs phone-side confirmation.
55astronomy / code / logviewer / speech / translate / things / networklocation / office / web / openassistantvariousObject found (astronomy go-to aligned), run/test complete (code), error spike (logviewer), TTS done, translation spoken, device toggled (things), fix acquired, doc saved, download complete (web), assistant reply (openassistant)Vibration mostlysingle confirm/tick each; things device-on/off two-tick; astronomy alignment-in-range speeding tickslowLong-tail consistency via shared helper; individually low, collectively the reason to build it once.
56watch / wear appsclock-wear WearRingActivity (EXISTS: ringtone+vibration), calendar-wear, maps-wear, todo-wear, findfamily-wear, music-wearAlarm on wrist, turn-by-turn, task done, member arrivalVibration primarywear: vibration patterns only (speaker-less use), already correct for alarmmediumWear is haptics-first; replicate phone patterns as vibration-only variants.

Shared helper proposal

Where: new library/sound Gradle module (library:sound, like library:format — small, opt-in), plus extend the existing library/ui Haptics. Do not put SoundPool code in library/ui (it owns Compose scaffold/icons; sound is platform, cf. every app's platform/ rule). Games that need achievements-triggered sounds consume it the same way.

API shape:

// library/sound
enum class SoundCue { Click, Confirm, Success, Error, Shutter, Explosion, TurnAlert, AlarmLite, /*…*/ }
interface SoundSettings { val soundEnabled: Boolean; val hapticsEnabled: Boolean; val volume: Float }
class AppSounds(context: Context, settings: () -> SoundSettings) {
    fun play(cue: SoundCue)          // SoundPool over res/raw assets, USAGE_ASSISTANCE_SONIFICATION (USAGE_GAME for games)
    fun buzz(kind: BuzzKind)         // Vibrator: Tick, Confirm, Reject, Alert(pattern)
    fun cue(cue: SoundCue)           // play + matching haptic in one call — the common case
}
@Composable fun rememberSounds(): AppSounds  // thin, in library/ui next to rememberHaptics()

Existing Haptics.confirm()/reject()/tick() map onto BuzzKind; call sites migrate to semantic cues, never raw waveforms (same argument Haptics.kt already makes).

Settings model: Android sandboxes give no cross-app shared prefs, so 'global' cannot be one store. Model it as: shared keys + defaults + settings-row composable in the library (Sound & haptics section: Sound on/off, Vibration on/off, volume), persisted by each app's existing <App>Prefs owner (the repo's one-preferences-owner rule). Defaults: sound on, haptics on, except keyboard (sound off, as today) and media players (no SFX). Always honour: ringer mode (silent/vibrate ⇒ no sound, per minesweeper/CallRinger precedent), system haptic-feedback setting (Compose LocalHapticFeedback already does), and DND for alert-class cues. Notification-channel sounds remain system-owned per channel (findfamily model) — the helper is for in-app cues only.

Assets (owner preference): real audio files, generated locally (offline synth script rendering .ogg/.wav committed under library/sound/src/main/res/raw/), never downloaded, and — new rule — not synthesised at runtime. Voxels SoundFx should migrate its generated WAVs to committed assets on next touch. One shared cue set (~12 files, <200 KB total) serves the whole suite; per-game extras (explosion, kart engine) live in that game's res/raw.

Rollout order: (1) library/sound + settings row, (2) high-priority in-flight-adjacent (todo complete, hub unlock, chess/solitaire moves, clock timer), (3) commerce/maps/health confirmations, (4) low long-tail as apps are touched. Each step is one app per diff.

Notes / non-candidates

  • Music/YouPipe/Uniflix/photos player surfaces: no SFX over media, ever (audio focus). Biometric prompts, system ringtone picker, permission dialogs: system-owned feedback, do not duplicate. Routine refreshes, scrolling, tab switches: silent (existing drag-tick haptics in notes/weather/youpipe are the ceiling). Wear: vibration only.