feat: configurable ring settings screen
Adds a Settings screen (SettingsActivity) where the user configures: - the SMS trigger phrase (replaces hardcoded RING_NOW/PLAY_SONG) - the sound: system ringtone (with picker) or a picked audio file - the play duration (5-300s, replaces the fixed 30s) Values persist via RingConfig (SharedPreferences). SmsReceiver matches the configured phrase; RingService plays the stored Uri for the configured length. Removes the old MediaStore by-name song search and its hardcoded duration.
This commit is contained in:
parent
6d05e22259
commit
63791b9f5e
10 changed files with 560 additions and 134 deletions
26
README.md
26
README.md
|
|
@ -9,18 +9,26 @@ An Android app that listens for SMS commands to trigger a loud ring — overridi
|
|||
|
||||
---
|
||||
|
||||
## SMS Trigger Commands
|
||||
## SMS Trigger
|
||||
|
||||
| Command | Behaviour |
|
||||
|--------------------|----------------------------------------------------------------------------------|
|
||||
| `RING_NOW` | Plays the default system ringtone at max volume. |
|
||||
| `PLAY_SONG <name>` | Searches local `MediaStore` for a matching song. Plays it, or falls back to the default ringtone if not found. |
|
||||
The app listens for a **configurable trigger phrase**. When an incoming SMS body
|
||||
matches it exactly (case-insensitive, trimmed), the app rings.
|
||||
|
||||
Playback always runs for exactly **30 seconds**, then the previous volume is
|
||||
restored.
|
||||
> Both the phrase, the sound it plays, and the duration are configurable from the
|
||||
> in-app **Ring Settings** screen (launched from the **"Ring Settings"** button).
|
||||
> Send the configured phrase to your phone from any other phone to trigger it.
|
||||
|
||||
> Send the SMS to your phone from any other phone. The command is matched
|
||||
> case-insensitively.
|
||||
### Trigger Phrase (default: `RING_NOW`)
|
||||
Configured in **Settings**. Any SMS whose body equals the phrase triggers the ring.
|
||||
|
||||
### Sound
|
||||
Choose between:
|
||||
- **System ringtone** (or pick a specific one), or
|
||||
- **Custom song** — pick any audio file on the device.
|
||||
|
||||
### Duration
|
||||
Playback runs for the configured number of seconds (`5–300`, default **30**), then
|
||||
the previous volume is restored.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue