feat(ringtones): let a music app play the alarm
"Choose from a music app…" in the sound picker browses any app that shares its library through Android's MediaBrowserService and stores the choice as a clockula://media URI in the existing ringtone field — no schema change, no new permission, no internet. The music app streams with its own. At ring time the app is asked to play through its media session. Every wait is bounded and any failure falls back to the ordinary alarm sound: the app won't connect or start, stalls or buffers too long, or the media stream might not be heard (headphones or a classic Bluetooth device connected, Do Not Disturb muting media). The ramp drives the media stream and the user's media volume is restored when the last media ring ends. RingAudioPlayer.start no longer suspends: vibration starts up front, the timer collector is not held up, and a generation token keeps late work from reviving a stopped ring.
This commit is contained in:
@@ -198,6 +198,14 @@ Tag sections feed the release notes — see [`docs/RELEASING.md`](docs/RELEASING
|
||||
pause, resume and reset right on the widget), and a clock that grows to show
|
||||
your world clocks at larger sizes. Each one updates the moment something
|
||||
changes — no polling, no stale numbers.
|
||||
- Wake up to your own music: "Choose from a music app…" in the sound picker
|
||||
lets any app that shares its library (VLC, AntennaPod and many others) play
|
||||
your alarm or timer — a playlist, an album, a single track, or just whatever
|
||||
it played last. The music app does the playing, so Clockula still has no
|
||||
internet permission. If the app can't play — uninstalled, logged out,
|
||||
offline, or stops partway — your alarm rings with the default sound instead.
|
||||
It does the same when the music might not be heard: headphones or a
|
||||
Bluetooth device connected, or Do Not Disturb muting media.
|
||||
|
||||
### Changed
|
||||
- Tapping the alarm icon in the status bar, or the next-alarm line on the lock
|
||||
|
||||
Reference in New Issue
Block a user