Ring shift alerts like a soft alarm instead of a single ping - #175
Merged
Conversation
Bundle a 28 second synthesized chime (shift_alarm.wav) via the expo-notifications config plugin and use it for the pre-shift alert on both platforms. iOS caps notification sounds at 30s, so the chime rings for roughly the whole 30 second lead-in window. On Android the sound now plays through the ALARM audio stream, so it rings at the user's alarm volume even when notification volume is down. Android channels are immutable after creation, so this ships as a new shift-alerts-v2 channel; the old channel is deleted on the next ensureShiftAlertChannel() run.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The 30-second pre-shift notification now rings like a soft alarm instead of playing the phone's default one-shot notification ping.
assets/sounds/shift_alarm.wav) through the expo-notifications config plugin. iOS caps notification sounds at 30 seconds, so the chime rings for roughly the whole lead-in window.shift-alerts-v2channel. The oldshift-alertschannel is deleted on the nextensureShiftAlertChannel()run so users don't see a stale duplicate in the app's notification settings.shift_alarm.wavis used there.Notes
Verification
npm run typecheck: cleannpm test: 15 files, 106 tests passednpm run lint: clean