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:
1 parent
767b9ed72d
commit
f37c5f2f84
28 files changed
+1653
-46
No files matched your search
@@ -80,6 +80,15 @@ own audio file through Android's system file picker. Clockula can then read
|
||||
exactly that file, so it can play it when the alarm rings. It has no access to
|
||||
your other files.
|
||||
|
||||
You can also let a music app on your device play the alarm. Clockula then sees
|
||||
which installed apps share their music library through Android's standard media
|
||||
interface, and nothing else about your installed apps. When you browse one,
|
||||
Clockula reads the folder and track names that app chooses to share and stores
|
||||
the item you pick. When the alarm rings, Clockula asks that app to play it. The
|
||||
music app plays it with its own permissions and under its own privacy policy.
|
||||
If it streams the music, the music app opens that connection, not Clockula.
|
||||
Clockula still has no internet access.
|
||||
|
||||
### Notifications and the lock screen
|
||||
|
||||
Alarms, timers and the running stopwatch appear as local notifications, and a
|
||||
|
||||
Reference in new issue
Block a user