Alarm tone types
The app supports four types of alarm tones:System default
Uses the device’s default alarm sound set in system settings
Default
Uses the default ringtone configured in the app settings
Custom sound
Any audio file or ringtone from your device
Silent
No sound - visual and vibration only (if vibration is enabled)
Setting alarm tones
Global default ringtone
Preference key:default_ringtoneDefault value: System default This setting controls the default alarm tone for new alarms:
- Open Settings
- Find “Default alarm tone” or “Default ringtone”
- Select your preferred sound
- All new alarms will use this tone unless you override it
Per-alarm ringtone
Each alarm can have its own unique ringtone:Alarm tone storage
Alarm tones are stored as URI strings internally:Alarmtone data structure
Alarmtone data structure
The app uses a sealed class hierarchy for alarm tones (source: Alarmtone.kt):
- Silent: No sound will play
- Default: Uses the app’s default ringtone setting
- SystemDefault: Uses Android’s system default alarm sound
- Sound: Custom ringtone with a specific URI
Alarm tone behavior
Fade-in effect
All alarm tones (except silent) fade in gradually:- Default fade-in time: 30 seconds (preference key:
fade_in_time_sec) - The volume starts at 0% and gradually increases to full volume
- Fade-in applies to both regular alarms and pre-alarms
- You can set fade-in to 1 second to effectively disable it
Pre-alarms play at half the configured pre-alarm volume, then that volume is faded in over the fade-in duration.
Volume control
Alarm volume is separate from media volume:- Uses the system’s alarm volume stream
- Can be adjusted independently from notification and media volumes
- Pre-alarm has its own volume setting (default: 5 out of 10)
- Regular alarms use the system alarm volume
Volume calculation
Volume calculation
The actual volume played is calculated as:For regular alarms:
- System alarm volume × fade-in percentage
- (Pre-alarm volume setting / 10) × 0.5 × fade-in percentage
Ringtone manager integration
The app integrates with Android’s RingtoneManager:URI conversion
Internal alarm tone objects are converted to URI strings that RingtoneManager can understand
Default alarm alert URI
The system default alarm sound is accessed via:Silent alarms
Silent alarms can be useful for:Vibration only
Wake up with vibration but no sound
Visual notifications
Get notified without disturbing others
Testing
Test alarm functionality without sound
Reminders
Use alarms as silent reminders with notifications
Even with a silent alarm, the alarm notification will still appear, and vibration will work if enabled.
Troubleshooting
Alarm not playing sound
Alarm not playing sound
If your alarm isn’t making sound:
- Check that the alarm tone is not set to “Silent”
- Verify your device’s alarm volume is not at 0
- Ensure Do Not Disturb allows alarms
- Check that the alarm tone file/URI is still valid
- Try selecting a different ringtone
Custom ringtone disappeared
Custom ringtone disappeared
If a custom ringtone is no longer available:
- The audio file may have been deleted or moved
- The app will show an error or may not play sound
- Select a new ringtone from the alarm details
- Consider using system default tones for reliability
Migration and compatibility
The app includes migration logic for users upgrading from older versions:- Empty strings are converted to “Default”
nullvalues are converted to “Silent”- System default URIs are normalized to “Default”
- Custom URIs are preserved as
Soundtypes