mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-25 05:58:34 +02:00
[PR #1555] [MERGED] Add:Android sleep timer setting to play a chime when almost finished #1617
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1555
Author: @advplyr
Created: 4/24/2025
Status: ✅ Merged
Merged: 4/25/2025
Merged by: @advplyr
Base:
master← Head:sleep_timer_chime_android📝 Commits (2)
d97c6a0Add:Android sleep timer setting to play a chime when almost finished #60067f5145Remove unused imports and release log📊 Changes
9 files changed (+51 additions, -8 deletions)
View changed files
📝
android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt(+5 -3)📝
android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt(+4 -0)📝
android/app/src/main/java/com/audiobookshelf/app/managers/SleepTimerManager.kt(+21 -0)📝
android/app/src/main/java/com/audiobookshelf/app/player/MediaSessionCallback.kt(+0 -1)📝
android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt(+0 -4)📝
android/app/src/main/java/com/audiobookshelf/app/player/ShakeDetector.kt(+2 -0)➕
android/app/src/main/res/raw/bell.mp3(+0 -0)📝
pages/settings.vue(+17 -0)📝
strings/en-us.json(+2 -0)📄 Description
This adds a new sleep timer setting for Android: "Play a chime when almost finished".
A chime sound is played when 30 seconds are remaining.
The setting was labeled "almost finished" in case we want to support another setting to change the time remaining.
The volume of the chime sound is set to 0.7 and could also potentially be another setting.
I picked out a chime sound pretty quickly so we can swap this out if we find a better one.
Lastly, I slightly increased the shake sensitivity for "Very high", "high" and "medium" after doing some testing and added an AbsLogger log for that.
Fixes #600
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.