Skip to content

feat(settings): Add RTTTL ringtone playback in settings#3799

Merged
jamesarich merged 3 commits into
mainfrom
feat/ringtone-player
Nov 24, 2025
Merged

feat(settings): Add RTTTL ringtone playback in settings#3799
jamesarich merged 3 commits into
mainfrom
feat/ringtone-player

Conversation

@jamesarich

@jamesarich jamesarich commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

Adds RTTL import and playback to External Notification settings.

screen-20251124-115738-1764007036070.mp4

This commit introduces a "Play" button next to the RTTTL ringtone input field in the External Notification settings screen. Tapping this button will play the entered RTTTL string, allowing users to preview the ringtone directly on their phone.

- Added a play icon button to the `TextFieldPreference` for the ringtone.
- Implemented playback logic using `MediaPlayer` by writing the RTTTL string to a temporary file.
- Added a new string resource for the "Play" button's content description.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit introduces a file import functionality for the RTTTL ringtone on the External Notification settings screen.

- Adds a "Folder" icon button to open the system file picker.
- Implemented logic to read the selected file's content and populate the ringtone text field.
- Added user feedback via Toast messages for successful imports, empty files, or errors.
- Minor refactoring to pass a `Modifier` to `RadioConfigScreenList` and `ExternalNotificationConfigScreen`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 24, 2025
@jamesarich jamesarich enabled auto-merge November 24, 2025 18:54
@codecov

codecov Bot commented Nov 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.54%. Comparing base (9aef9a2) to head (9b0aa2f).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...io/component/ExternalNotificationConfigItemList.kt 0.00% 41 Missing ⚠️
.../settings/radio/component/RadioConfigScreenList.kt 0.00% 2 Missing ⚠️
...m/geeksville/mesh/navigation/SettingsNavigation.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3799      +/-   ##
========================================
- Coverage   0.55%   0.54%   -0.02%     
========================================
  Files        381     386       +5     
  Lines      21861   22463     +602     
  Branches    2708    2814     +106     
========================================
  Hits         122     122              
- Misses     21719   22320     +601     
- Partials      20      21       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…nfigScreen

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 3efbcaa Nov 24, 2025
5 checks passed
@jamesarich jamesarich deleted the feat/ringtone-player branch November 24, 2025 19:58
@jamesarich jamesarich added this to the 2.7.8 milestone Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant