33 Commits
Author SHA1 Message Date
kalarina fe77813e53 Move Google Play notice to the top of README 2026-11-08 17:26:04 +02:00
kalarina 13acbc6d6a Add Google Play closed testing notice to README 2026-11-08 17:23:00 +02:00
kalarina 46a3f94057 Escape ampersands in new station strings 2026-11-08 14:10:06 +02:00
kalarina cca6d5e19c Release 1.0.13
- Add LRT Radijas, Žinių radijas, Latvijas Radio 1 and Latvijas Radio 2
- Add HLS playback (media3-exoplayer-hls) for the Latvijas Radio streams
- Add "News & talk" and "Latvian music" genres
- Show the view options button on the Radio tab only; Favorites uses the same layout
- Update descriptions and changelogs

Inspired by https://github.com/JacobBico/fogwave-baltic
2026-11-08 13:50:10 +02:00
kalarina 5561754a71 Release 1.0.13 2026-11-07 16:29:40 +02:00
kalarina f84df8b21e Reconnect the media controller after it disconnects 2026-11-07 16:28:01 +02:00
kalarina 197ac2784c Make stream reconnects reliable and create audio effects off the main thread
- Hold a wake lock and Wi-Fi lock while a reconnect is pending so the backoff
  does not stall with the screen off
- Raise the rebuffer threshold to 2.5 s to stop play-stall stutter on weak networks
- Reconnect at once when the default network changes during a stall
- Give up quickly on errors that will not recover (4xx, unsupported format)
- Build audio effects on a background thread to keep startup smooth
2026-11-07 16:28:01 +02:00
kalarina 237be98cf0 Cache equalizer state instead of querying audioserver on every slider move 2026-11-07 16:28:01 +02:00
kalarina 91e5467d11 Add GitHub issue and pull request templates 2026-11-05 18:44:16 +02:00
kalarina d9b12c9899 Update store and README screenshots 2026-11-03 15:56:01 +02:00
kalarina 9efb12a25f Release 1.0.12 with only the WebP interface icons on top of 1.0.11 2026-11-03 15:36:07 +02:00
kalarina 52af3a7f4c Fix station artwork resource loading in player 2026-11-03 14:45:05 +02:00
kalarina ae47b574c1 Load player artwork the same way as the station list 2026-11-03 14:09:24 +02:00
kalarina 8e815865da Load station logos the way 1.0.11 did 2026-11-03 13:53:36 +02:00
kalarina 50ac9f9886 Decode station logos directly at full size 2026-11-03 13:47:51 +02:00
kalarina fa2fda44d1 Release 1.0.12
- Load preferences and all station logos off the main thread
- Keep equalizer updates and player animations from recomposing whole screens
- Build the Android Auto browse tree once and serve it from memory
- Create only the audio and metadata renderers, ship only the app's languages
- Store interface icons as lossless WebP, drop unused code and dependencies
2026-11-03 12:42:31 +02:00
kalarina 6a819880e2 Use GPL-3.0-only license wording 2026-10-21 14:50:40 +00:00
kalarina 5fe3a0af0b Make star request platform-neutral 2026-10-20 13:01:12 +00:00
kalarina ac64478773 Add star request to README 2026-10-20 12:59:10 +00:00
kalarina 62df72f9b8 Point Obtainium links to Gitea 2026-10-16 11:59:21 +00:00
kalarina 1eae2c8493 Redesign README: store badges, release badge, install options 2026-10-16 11:50:50 +00:00
kalarina 440fbec8e3 Upload files to "assets" 2026-10-16 11:42:48 +00:00
kalarina 61fa65b080 Upload files to "assets" 2026-10-16 11:40:58 +00:00
kalarina 5bd0d96a92 Update store descriptions in six languages 2026-10-13 14:54:45 +00:00
kalarina e4a36b6cfa Remove duplicate account note from CONTRIBUTING 2026-10-12 13:37:27 +00:00
kalarina 4454a422bb Update README 2026-10-12 13:34:09 +00:00
kalarina 2900470e90 Use Gitea as the only contribution channel 2026-10-11 14:10:44 +00:00
kalarina f86d8cc70d Add contributing guide and issue/PR templates 2026-10-11 14:01:06 +00:00
kalarina 6485a51249 Restructure README 2026-10-11 13:46:30 +00:00
kalarina 1b52c5dbab Add minimum Android version to README 2026-10-11 13:41:01 +00:00
kalarina 7482217528 Remove fdroid recipe, state GPL-3.0-only, format key fingerprint
The build recipe now lives in fdroiddata, so the outdated copy in
fdroid/ is removed. README states the license as GPL-3.0-only to
match the F-Droid metadata and shows the signing certificate
fingerprint in colon-separated form.
2026-10-10 15:28:54 +00:00
kalarina e3aa92d346 Remove CHANGELOG.md and verify downloads by signing key
CHANGELOG.md was out of date (stopped at v1.0.10 under the old
Fogwawe name), so it is removed. README now tells users to verify
the APK signing certificate instead of per-file checksums and fixes
the APK file name in the adb example.
2026-10-10 15:17:26 +00:00
kalarinaandClaude Opus 5.5 be11ae190d Store all text files with LF line endings
Adds a catch-all "* text=auto eol=lf" rule so a Windows clone keeps
LF in assets and resources and release APKs built on Windows match
F-Droid's Linux build. Existing rules for gradlew, batch files and
binaries are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K8GS1YNyjzkkhpGz368nGD
2026-10-10 14:04:07 +00:00
131 changed files with 737 additions and 277 deletions
+1
View File
@@ -1,3 +1,4 @@
* text=auto eol=lf
gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
+27
View File
@@ -0,0 +1,27 @@
---
name: Bug report
about: Something doesn't work as expected
title: "[Bug] "
---
**What happened**
**Steps to reproduce**
1.
2.
3.
**What you expected**
**Environment**
- App version:
- Installed from: Gitea / F-Droid / Google Play
- Device and Android version:
- Station (if related):
**Screenshots or logs** (optional)
+18
View File
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea that fits the app
title: "[Feature] "
---
<!-- Please check the "Out of scope" list in CONTRIBUTING.md before opening this. -->
**What problem does this solve**
**Proposed solution**
**Alternatives you considered**
- [ ] I'd like to implement this myself
+15
View File
@@ -0,0 +1,15 @@
---
name: Station request
about: Suggest a Lithuanian radio station
title: "[Station] "
---
<!-- Only Lithuanian stations with an official public stream are accepted. -->
- Station name:
- Official website:
- Stream URL:
- Genre:
- [ ] The station is Lithuanian
- [ ] The stream is official and public
+12
View File
@@ -0,0 +1,12 @@
---
name: Translation fix
about: Report a wrong or awkward translation
title: "[Translation] "
---
<!-- Supported languages: English, Russian, German, Japanese, Lithuanian, Chinese. New languages are not accepted. -->
- Language:
- Screen or place in the app:
- Current text:
- Suggested text:
+16
View File
@@ -0,0 +1,16 @@
## What does this change
## Related issue
Closes #
## Checklist
- [ ] Discussed in an issue first (not needed for small fixes)
- [ ] `./gradlew assembleDebug` builds
- [ ] Tested on a device or emulator (Android version: )
- [ ] No ads, analytics, trackers or Google Play Services / Firebase dependencies
- [ ] New strings added to `values/strings.xml` (missing translations noted below)
- [ ] Screenshots added for UI changes
- [ ] I agree that my contribution is licensed under GPL-3.0-only
+27
View File
@@ -0,0 +1,27 @@
---
name: Bug report
about: Something doesn't work as expected
title: "[Bug] "
---
**What happened**
**Steps to reproduce**
1.
2.
3.
**What you expected**
**Environment**
- App version:
- Installed from: Gitea / GitHub / F-Droid / Google Play
- Device and Android version:
- Station (if related):
**Screenshots or logs** (optional)
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Main repository on git.skysparkle.cc
url: https://git.skysparkle.cc/kalarina/Fogwave
about: This GitHub repository is a mirror. Issues are welcome here and on Gitea.
+18
View File
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea that fits the app
title: "[Feature] "
---
<!-- Please check the "Out of scope" list in CONTRIBUTING.md before opening this. -->
**What problem does this solve**
**Proposed solution**
**Alternatives you considered**
- [ ] I'd like to implement this myself
+15
View File
@@ -0,0 +1,15 @@
---
name: Station request
about: Suggest a Lithuanian radio station
title: "[Station] "
---
<!-- Only Lithuanian stations with an official public stream are accepted. -->
- Station name:
- Official website:
- Stream URL:
- Genre:
- [ ] The station is Lithuanian
- [ ] The stream is official and public
+12
View File
@@ -0,0 +1,12 @@
---
name: Translation fix
about: Report a wrong or awkward translation
title: "[Translation] "
---
<!-- Supported languages: English, Russian, German, Japanese, Lithuanian, Chinese. New languages are not accepted. -->
- Language:
- Screen or place in the app:
- Current text:
- Suggested text:
+16
View File
@@ -0,0 +1,16 @@
## What does this change
## Related issue
Closes #
## Checklist
- [ ] Discussed in an issue first (not needed for small fixes)
- [ ] `./gradlew assembleDebug` builds
- [ ] Tested on a device or emulator (Android version: )
- [ ] No ads, analytics, trackers or Google Play Services / Firebase dependencies
- [ ] New strings added to `values/strings.xml` (missing translations noted below)
- [ ] Screenshots added for UI changes
- [ ] I agree that my contribution is licensed under GPL-3.0-only
-17
View File
@@ -1,17 +0,0 @@
# Changelog
All notable builds of Fogwave are tracked here. None of these builds have a recoverable build timestamp (reproducible Android builds normalize internal file dates), so versions are numbered in the order they were provided; `v1.0.10` is the current, official latest build.
| Version | APK | Size | SHA-256 |
|---|---|---|---|
| v1.0.10 | [`Fogwawe-v1.0.10.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.10/Fogwawe-v1.0.10.apk) | 2.90 MB | `0e5d8daa71b3b3224192e8d8fc9687bcf4d28c62269c698d0921a2c9a44ed89d` |
| v1.0.9 | [`Fogwawe-v1.0.9.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.9/Fogwawe-v1.0.9.apk) | 2.85 MB | `dc0e96e13a322b702d673e1c1a0a44c5db6fbb7ac49de69fe60a48d3005fad9b` |
| v1.0.8 | [`Fogwawe-v1.0.8.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.8/Fogwawe-v1.0.8.apk) | 2.85 MB | `1baca54152ae1fc46f6b6894f798f3eff3f122fdadb22b22a604c90ae457c840` |
| v1.0.7 | [`Fogwawe-v1.0.7.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.7/Fogwawe-v1.0.7.apk) | 4.09 MB | `8f6dea613968f3c11bc8ea345b2fc62c79d34fc14129bec2757a00065b17f545` |
| v1.0.6 | [`Fogwawe-v1.0.6.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.6/Fogwawe-v1.0.6.apk) | 17.62 MB | `f1fd8479d9996bace2ca91c134ce4a0b835ba76ce69fddad4a3a440a7c137812` |
| v1.0.5 | [`Fogwawe-v1.0.5.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.5/Fogwawe-v1.0.5.apk) | 2.60 MB | `b3a567c32f3090e7ab91990ef0adf77d5c478cd136814092c81ca93cb044e47c` |
| v1.0.4 | [`Fogwawe-v1.0.4.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.4/Fogwawe-v1.0.4.apk) | 2.58 MB | `267c6c86bfa2ec521ab9a926bd3dbf97e69c8591e6d0548e9d59c6278ab8c77d` |
| v1.0.3 | [`Fogwawe-v1.0.3.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.3/Fogwawe-v1.0.3.apk) | 2.60 MB | `a011d962890a25f173593d0920b02ffa8ead38853c7dc8102c7eb976f7248461` |
| v1.0.2 | [`Fogwawe-v1.0.2.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.2/Fogwawe-v1.0.2.apk) | 2.60 MB | `152b09794e235e81d3421a0f20437d01608c776b180442cdaf57cd958c60c0b3` |
| v1.0.1 | [`Fogwawe-v1.0.1.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.1/Fogwawe-v1.0.1.apk) | 2.85 MB | `964979e2f60f7f5369f57c5b5d636563f9be0bae0128bbe318a00eaac8ea13c7` |
| v1.0.0 | [`Fogwawe-v1.0.0.apk`](https://github.com/kalarina-bit/Fogwave/releases/download/v1.0.0/Fogwawe-v1.0.0.apk) | 2.83 MB | `9a3fc4a45326315303f636535d9e88790bf72d244a5ffc54648c1b8d1132616d` |
+65
View File
@@ -0,0 +1,65 @@
# Contributing to Fogwave
Thanks for wanting to help! This guide explains where to contribute, what fits the project and how to send changes.
## Where to contribute
Issues and pull requests go to the repository on [Gitea](https://git.skysparkle.cc/kalarina/Fogwave).
## Ways to help
- **Report a bug** — use the *Bug report* template.
- **Suggest a station** — use the *Station request* template.
- **Suggest a feature** — use the *Feature request* template; check [Out of scope](#out-of-scope) first.
- **Fix a translation** — use the *Translation fix* template or send a pull request.
- **Write code** — see [Pull requests](#pull-requests).
## Before you start
- **Small changes** (typos, obvious bugs, translation fixes): send a pull request directly.
- **Anything bigger** (new features, UI changes, new dependencies): open an issue first and wait for a go-ahead, so your work isn't wasted.
## Ground rules
- No ads, analytics, trackers, crash reporters or accounts.
- No Google Play Services, Firebase or other proprietary libraries — the app must stay buildable for F-Droid.
- New dependencies must be open source and justified in the pull request.
- Be respectful in issues and reviews.
## Out of scope
These will not be accepted:
- Stations from outside Lithuania.
- A light theme or automatic light/dark switching — Fogwave is dark only.
- New UI languages (see [Translations](#translations)).
## Stations
A new station must be Lithuanian, have an official public stream (HTTP or HTTPS) and allow playback in third-party players. Include the official website and stream URL in the request.
## Translations
Fogwave is available in exactly six languages: English, Russian, German, Japanese, Lithuanian and Chinese. Fixes to these are welcome; new languages are not accepted.
- App strings: `app/src/main/res/values-<lang>/strings.xml` (English is `values/`).
- Store listing: `fastlane/metadata/android/<locale>/`.
If your code adds new strings, add them to `values/strings.xml`. Translations for the other languages are welcome but not required — mention missing ones in the pull request.
## Pull requests
1. Fork the repository and create a branch from `main`.
2. Keep one topic per pull request.
3. Follow the existing Kotlin and Jetpack Compose style; keep comments short and in English; don't reformat unrelated code.
4. Make sure `./gradlew assembleDebug` builds, and test on a device or emulator.
5. Write short, plain commit messages in English (for example `Fix crash when stream URL is empty`).
6. Add screenshots for UI changes.
## Security
Please don't post details of security issues publicly. Open a short issue titled "Security contact" without any details, and the maintainer will reach out privately.
## License
By contributing, you agree that your contribution is licensed under the [GNU General Public License v3.0 only](LICENSE), the same as the rest of the project.
+1 -2
View File
@@ -636,8 +636,7 @@ the "copyright" line and a pointer to where the full notice is found.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
+50 -57
View File
@@ -1,99 +1,92 @@
<p align="center">
<img src="assets/icon-rounded.png" width="128" alt="Fogwave icon">
<img src="assets/icon-rounded.png" width="112" alt="Fogwave icon">
</p>
<h1 align="center">Fogwave</h1>
<p align="center">
<a href="https://git.skysparkle.cc/kalarina/Fogwave/releases"><img src="assets/get-it-on-gitea.png" height="60" alt="Get it on Gitea"></a>
<b>A calm, open-source internet radio app for Android.</b><br>
Listen to Lithuania's favorite stations in one tap.
</p>
> [!IMPORTANT]
> **Fogwave is coming to Google Play!** The app is now in closed testing there ahead of the public release. Ideas, wishes and suggestions for improvement are very welcome — send them wherever is easiest for you: an issue on [Gitea](https://git.skysparkle.cc/kalarina/Fogwave/issues) or [GitHub](https://github.com/kalarina-bit/Fogwave/issues), or an email to [cuken107@proton.me](mailto:cuken107@proton.me).
<p align="center">
<a href="https://github.com/kalarina-bit/Fogwave/releases/latest"><img src="https://img.shields.io/github/v/release/kalarina-bit/Fogwave?style=for-the-badge&label=release&labelColor=1b1b1b&color=2e7d32" alt="Latest release"></a>
</p>
<p align="center">
<img src="https://img.shields.io/github/downloads/kalarina-bit/Fogwave/latest/total?label=downloads&color=2e7d32&labelColor=1b1b1b" alt="downloads counter">
<a href="https://f-droid.org/packages/cc.skysparkle.fogwave/"><img src="assets/get-it-on%20(1).png" height="56" alt="Get it on F-Droid"></a>
<a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Fogwave"><img src="assets/badge_obtainium.png" height="56" alt="Get it on Obtainium"></a>
<a href="https://github.com/kalarina-bit/Fogwave/releases/latest"><img src="assets/get-it-on-github.png" height="56" alt="Get it on GitHub"></a>
<a href="https://git.skysparkle.cc/kalarina/Fogwave/releases"><img src="assets/get-it-on-gitea.png" height="56" alt="Get it on Gitea"></a>
</p>
**A calm, open-source internet radio app for Android.**
<p align="center">
<img src="assets/screenshots/1-lithuanian-radio-left.png" width="160" alt="Lithuanian radio, live"><img src="assets/screenshots/2-lithuanian-radio-right.png" width="160" alt="Station list">
<img src="assets/screenshots/3-favorites.png" width="160" alt="Save your favorites">
<img src="assets/screenshots/4-listen-live.png" width="160" alt="Listen live">
</p>
Listen to Lithuania's favorite stations in one tap — with background playback, a built-in equalizer, and a clean, distraction-free design.
> [!TIP]
> If you find Fogwave useful, please consider giving it a ⭐ — it helps others discover the project.
## Features
## ✨ Features
- 📻 **10 Lithuanian stations** — ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1, Gold FM and more
- 📻 **14 stations from Lithuania and Latvia** — ZIP FM, Power Hit Radio, Rock FM, LRT Radijas, Žinių radijas, Latvijas Radio 1 & 2 and more
- 🎧 **Background playback** with lock-screen, notification, headphone and Bluetooth controls
- 🚗 **Android Auto** support
- 🔄 **Auto-reconnect** when the stream drops or the network comes back
- 🎚️ **Equalizer** with presets, loudness boost and dynamics processing — settings are saved
- 🎚️ **Equalizer** with presets, loudness boost and dynamics processing
- ❤️ **Favorites, recently played and similar stations** matched by genre
- 🗂️ **Four layouts** — list, table, tiles or icons, with adjustable size
- 🌙 **Clean, elegant UI** in a dark theme
- 🌍 Available in English, Russian, German, Japanese, Lithuanian, and Chinese
- 🔓 **100% open source** — no ads, no tracking, no accounts
- 🌙 **Dark theme**
- 🌍 **Six languages** — English, Russian, German, Japanese, Lithuanian and Chinese
- 🔓 **No ads, no tracking, no accounts**
## Screenshots
## <img src="assets/icon-install.png" width="32" alt=""> Installation
<p align="center">
<img src="assets/screenshots/5-feel-closer.png" width="200" alt="Feel closer to Lithuania">
<img src="assets/screenshots/4-stations.png" width="200" alt="Browse all stations">
<img src="assets/screenshots/1-find-station.png" width="200" alt="Find a station, then settle in">
<img src="assets/screenshots/2-your-style.png" width="200" alt="Just your style">
<img src="assets/screenshots/3-soundtrack.png" width="200" alt="Your soundtrack">
</p>
- **[F-Droid](https://f-droid.org/packages/cc.skysparkle.fogwave/)** — install and update through the F-Droid client.
- **[Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Fogwave)** — installs the APK straight from Gitea releases and keeps it up to date.
- **Manually** — download the latest APK from [GitHub](https://github.com/kalarina-bit/Fogwave/releases/latest) or [Gitea](https://git.skysparkle.cc/kalarina/Fogwave/releases), allow installs from unknown sources for the app you open it with (Settings → Apps → Special access → Install unknown apps), then open the `.apk` and confirm.
## Installation
## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download
<img src="assets/icon-install.png" width="36" align="left">
1. Download the APK for the version you want from the [Releases page](https://github.com/kalarina-bit/Fogwave/releases).
2. On your Android device, allow installs from unknown sources for the app you use to open the file (Settings → Apps → Special access → Install unknown apps).
3. Open the downloaded `.apk` file and confirm the install.
Or via `adb` (after downloading):
Every official APK is signed with the same key. Check it before installing:
```sh
adb install Fogwawe-v1.0.10.apk
apksigner verify --print-certs Fogwave-v<version>.apk
```
## Verifying a download
The SHA-256 fingerprint of the signing certificate must be:
<img src="assets/icon-verify.png" width="36" align="left">
Compare the SHA-256 checksum against the value listed in [CHANGELOG.md](CHANGELOG.md):
```sh
sha256sum Fogwawe-v1.0.10.apk
```
1A:85:AF:5A:08:23:DE:D1:76:7C:07:55:41:FA:15:87:7F:6E:3B:99:9E:5E:52:CF:2B:C8:03:55:F6:63:12:7F
```
## Building from source
`apksigner` prints the same value in lowercase without colons. On Android you can check it with [AppVerifier](https://github.com/soupslurpr/AppVerifier) (app ID `cc.skysparkle.fogwave`).
Requires JDK 17+ and Android Studio with Android SDK 37.
## <img src="assets/icon-structure.png" width="32" alt=""> Building from source
Requires JDK 17+ and Android SDK 37.
```sh
./gradlew assembleDebug
```
Release builds are signed only when a keystore is supplied through the `KEYSTORE_PATH`, `STORE_PASSWORD`, `KEY_ALIAS` and `KEY_PASSWORD` environment variables. Without them the release build is unsigned, which is what F-Droid expects. Keystores are excluded by `.gitignore` — never commit them.
Release builds are signed only when a keystore is supplied through the `KEYSTORE_PATH`, `STORE_PASSWORD`, `KEY_ALIAS` and `KEY_PASSWORD` environment variables; otherwise the release build is unsigned, as F-Droid expects. Never commit keystores.
For every release: bump `versionCode` and `versionName` in `app/build.gradle.kts`, add `fastlane/metadata/android/<locale>/changelogs/<versionCode>.txt`, and tag the commit as `v<versionName>` (for example `v1.0.11`).
### Releasing
## Repository structure
1. Bump `versionCode` and `versionName` in `app/build.gradle.kts`.
2. Add `fastlane/metadata/android/<locale>/changelogs/<versionCode>.txt`.
3. Tag the commit as `v<versionName>` (for example `v1.0.11`).
<img src="assets/icon-structure.png" width="36" align="left">
## 🤝 Contributing
```
.
├── app/ # Android app source (Kotlin, Jetpack Compose)
├── assets/ # README images and logos
│ └── screenshots/ # App screenshots
├── fastlane/ # F-Droid store listing, screenshots and changelogs
├── fdroid/ # Build recipe for fdroiddata
├── gradle/ # Gradle wrapper and version catalog
├── CHANGELOG.md # Per-version sizes and checksums (links to GitHub Releases)
├── LICENSE # GNU GPLv3
└── README.md
```
Bug reports, station suggestions, translation fixes and pull requests are welcome in the [issue tracker](https://git.skysparkle.cc/kalarina/Fogwave/issues). Please read [CONTRIBUTING.md](CONTRIBUTING.md) first — it explains what fits the project and how to send changes. To open an issue or a pull request, [create an account](https://git.skysparkle.cc/user/sign_up) on this Gitea.
APK builds themselves are published as assets on the [Releases page](https://github.com/kalarina-bit/Fogwave/releases), not stored in this repository.
## 📄 License
## License
This project is licensed under the **GNU General Public License v3.0** — see the [LICENSE](LICENSE) file for details.
[GNU General Public License v3.0 only](LICENSE).
+3 -2
View File
@@ -13,8 +13,8 @@ android {
applicationId = "cc.skysparkle.fogwave"
minSdk = 24
targetSdk = 36
versionCode = 11
versionName = "1.0.11"
versionCode = 13
versionName = "1.0.13"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -85,6 +85,7 @@ dependencies {
implementation(libs.coil.compose)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.exoplayer.hls)
implementation(libs.androidx.media3.common)
implementation(libs.androidx.media3.session)
implementation(libs.kotlinx.coroutines.android)
@@ -24,7 +24,9 @@ enum class Genre(@param:StringRes val labelRes: Int) {
OLDIES(R.string.genre_oldies),
ROCK(R.string.genre_rock),
EASY_LISTENING(R.string.genre_easy_listening),
LITHUANIAN(R.string.genre_lithuanian)
LITHUANIAN(R.string.genre_lithuanian),
NEWS_TALK(R.string.genre_news_talk),
LATVIAN(R.string.genre_latvian)
}
enum class ViewMode {
@@ -110,6 +110,43 @@ class RadioRepository(context: Context) {
genres = listOf(Genre.HITS, Genre.LITHUANIAN),
bitrate = "MP3 128 kbps",
lightBackdrop = true
),
RadioStation(
id = "lrt",
name = "LRT Radijas",
descriptionRes = R.string.station_desc_lrt,
streamUrl = "https://lrt-cast.lrt.lt/lrt_radijas",
iconResId = R.drawable.ic_station_lrt,
genres = listOf(Genre.NEWS_TALK, Genre.LITHUANIAN),
bitrate = "MP3",
lightBackdrop = true
),
RadioStation(
id = "ziniu",
name = "Žinių radijas",
descriptionRes = R.string.station_desc_ziniu,
streamUrl = "https://netradio.ziniur.lt/ziniur.mp3?n=975355",
iconResId = R.drawable.ic_station_ziniu,
genres = listOf(Genre.NEWS_TALK),
bitrate = "MP3"
),
RadioStation(
id = "lr1",
name = "Latvijas Radio 1",
descriptionRes = R.string.station_desc_lr1,
streamUrl = "https://muste.latvijasradio.lv/shoutcast/mp4:lr1a.stream/playlist.m3u8",
iconResId = R.drawable.ic_station_lr1,
genres = listOf(Genre.NEWS_TALK),
bitrate = "HLS"
),
RadioStation(
id = "lr2",
name = "Latvijas Radio 2",
descriptionRes = R.string.station_desc_lr2,
streamUrl = "https://muste.latvijasradio.lv/shoutcast/mp4:lr2a.stream/playlist.m3u8",
iconResId = R.drawable.ic_station_lr2,
genres = listOf(Genre.LATVIAN, Genre.POP),
bitrate = "HLS"
)
)
@@ -31,6 +31,8 @@ data class AudioEffectsState(
val dynamicsProcessingEnabled: Boolean = false
)
// Effect parameters are cached here: every getter on an AudioEffect is a call into audioserver,
// and the state is rebuilt on every frame while an equalizer slider is dragged.
class AudioEffectsEngine(context: Context, audioSessionId: Int) {
private val prefs: SharedPreferences =
context.applicationContext.getSharedPreferences("fogwave_audio_effects", Context.MODE_PRIVATE)
@@ -42,37 +44,53 @@ class AudioEffectsEngine(context: Context, audioSessionId: Int) {
private var loudnessEnhancer: LoudnessEnhancer? = null
private var dynamicsProcessing: DynamicsProcessing? = null
private val presetNames = mutableListOf<String>()
private var presetNames: List<String> = emptyList()
private var centerFreqsHz = IntArray(0)
private var bandLevels = IntArray(0)
private var minBandLevel = 0
private var maxBandLevel = 0
private var equalizerEnabled = prefs.getBoolean(KEY_EQ_ENABLED, false)
private var loudnessEnabled = prefs.getBoolean(KEY_LOUDNESS_ENABLED, false)
private var loudnessGain = prefs.getInt(KEY_LOUDNESS_GAIN, 0).coerceIn(0, MAX_LOUDNESS_GAIN)
private var dynamicsEnabled = prefs.getBoolean(KEY_DYNAMICS_ENABLED, false)
init {
try {
equalizer = Equalizer(0, audioSessionId).apply {
for (p in 0 until numberOfPresets) {
presetNames.add(getPresetName(p.toShort()))
}
presetNames = (0 until numberOfPresets).map { getPresetName(it.toShort()) }
val bandCount = numberOfBands.toInt()
centerFreqsHz = IntArray(bandCount) { getCenterFreq(it.toShort()) / 1000 }
val range = bandLevelRange
minBandLevel = range[0].toInt()
maxBandLevel = range[1].toInt()
val preset = currentPresetIndex
if (preset in 0 until numberOfPresets) {
usePreset(preset.toShort())
} else {
for (b in 0 until numberOfBands) {
for (b in 0 until bandCount) {
val saved = prefs.getInt(KEY_BAND_PREFIX + b, Int.MIN_VALUE)
if (saved != Int.MIN_VALUE) setBandLevel(b.toShort(), saved.toShort())
}
}
enabled = prefs.getBoolean(KEY_EQ_ENABLED, false)
bandLevels = IntArray(bandCount) { getBandLevel(it.toShort()).toInt() }
enabled = equalizerEnabled
}
} catch (e: Exception) {
Log.e(TAG, "Equalizer unavailable", e)
equalizer = null
}
try {
loudnessEnhancer = LoudnessEnhancer(audioSessionId).apply {
setTargetGain(prefs.getInt(KEY_LOUDNESS_GAIN, 0))
enabled = prefs.getBoolean(KEY_LOUDNESS_ENABLED, false)
setTargetGain(loudnessGain)
enabled = loudnessEnabled
}
} catch (e: Exception) {
Log.e(TAG, "LoudnessEnhancer unavailable", e)
loudnessEnhancer = null
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
@@ -134,94 +152,103 @@ class AudioEffectsEngine(context: Context, audioSessionId: Int) {
dp.setLimiterByChannelIndex(ch, limiter)
}
dp.enabled = prefs.getBoolean(KEY_DYNAMICS_ENABLED, false)
dp.enabled = dynamicsEnabled
return dp
}
fun currentState(): AudioEffectsState {
val eq = equalizer
val bands = if (eq != null) {
(0 until eq.numberOfBands).map { i ->
val idx = i.toShort()
val range = eq.bandLevelRange
val eqAvailable = equalizer != null
val bands = if (eqAvailable) {
bandLevels.indices.map { i ->
EqualizerBand(
index = i,
centerFreqHz = eq.getCenterFreq(idx) / 1000,
levelMillibel = eq.getBandLevel(idx).toInt(),
minLevelMillibel = range[0].toInt(),
maxLevelMillibel = range[1].toInt()
centerFreqHz = centerFreqsHz[i],
levelMillibel = bandLevels[i],
minLevelMillibel = minBandLevel,
maxLevelMillibel = maxBandLevel
)
}
} else emptyList()
return AudioEffectsState(
equalizerAvailable = eq != null,
equalizerEnabled = eq?.enabled ?: false,
equalizerAvailable = eqAvailable,
equalizerEnabled = eqAvailable && equalizerEnabled,
bands = bands,
presets = presetNames,
currentPreset = if (eq != null) currentPresetIndex else -1,
currentPreset = if (eqAvailable) currentPresetIndex else -1,
loudnessAvailable = loudnessEnhancer != null,
loudnessEnabled = loudnessEnhancer?.enabled ?: false,
loudnessGainMillibel = try {
loudnessEnhancer?.targetGain ?: 0f
} catch (_: Exception) {
0f
},
loudnessEnabled = loudnessEnhancer != null && loudnessEnabled,
loudnessGainMillibel = if (loudnessEnhancer != null) loudnessGain.toFloat() else 0f,
dynamicsProcessingAvailable = dynamicsProcessing != null,
dynamicsProcessingEnabled = dynamicsProcessing?.enabled ?: false
dynamicsProcessingEnabled = dynamicsProcessing != null && dynamicsEnabled
)
}
fun setEqualizerEnabled(enabled: Boolean) {
val eq = equalizer ?: return
try {
equalizer?.enabled = enabled
eq.enabled = enabled
equalizerEnabled = enabled
prefs.edit { putBoolean(KEY_EQ_ENABLED, enabled) }
} catch (_: Exception) {}
}
fun setBandLevel(band: Int, levelMillibel: Int) {
val eq = equalizer ?: return
if (band !in bandLevels.indices) return
val level = levelMillibel.coerceIn(minBandLevel, maxBandLevel)
if (bandLevels[band] == level && currentPresetIndex == -1) return
try {
equalizer?.setBandLevel(band.toShort(), levelMillibel.toShort())
eq.setBandLevel(band.toShort(), level.toShort())
bandLevels[band] = level
currentPresetIndex = -1
prefs.edit {
putInt(KEY_BAND_PREFIX + band, levelMillibel)
putInt(KEY_BAND_PREFIX + band, level)
putInt(KEY_PRESET, -1)
}
} catch (_: Exception) {}
}
fun setPreset(preset: Int) {
val eq = equalizer ?: return
try {
val eq = equalizer ?: return
eq.usePreset(preset.toShort())
currentPresetIndex = preset
for (b in bandLevels.indices) {
bandLevels[b] = eq.getBandLevel(b.toShort()).toInt()
}
prefs.edit {
putInt(KEY_PRESET, preset)
for (b in 0 until eq.numberOfBands) {
putInt(KEY_BAND_PREFIX + b, eq.getBandLevel(b.toShort()).toInt())
}
for (b in bandLevels.indices) putInt(KEY_BAND_PREFIX + b, bandLevels[b])
}
} catch (_: Exception) {}
}
fun setLoudnessEnabled(enabled: Boolean) {
val le = loudnessEnhancer ?: return
try {
loudnessEnhancer?.enabled = enabled
le.enabled = enabled
loudnessEnabled = enabled
prefs.edit { putBoolean(KEY_LOUDNESS_ENABLED, enabled) }
} catch (_: Exception) {}
}
fun setLoudnessGain(gainMillibel: Float) {
val le = loudnessEnhancer ?: return
val gain = gainMillibel.coerceIn(0f, MAX_LOUDNESS_GAIN.toFloat()).toInt()
if (gain == loudnessGain) return
try {
val gain = gainMillibel.coerceIn(0f, 2000f).toInt()
loudnessEnhancer?.setTargetGain(gain)
le.setTargetGain(gain)
loudnessGain = gain
prefs.edit { putInt(KEY_LOUDNESS_GAIN, gain) }
} catch (_: Exception) {}
}
fun setDynamicsProcessingEnabled(enabled: Boolean) {
val dp = dynamicsProcessing ?: return
try {
dynamicsProcessing?.enabled = enabled
dp.enabled = enabled
dynamicsEnabled = enabled
prefs.edit { putBoolean(KEY_DYNAMICS_ENABLED, enabled) }
} catch (_: Exception) {}
}
@@ -237,6 +264,7 @@ class AudioEffectsEngine(context: Context, audioSessionId: Int) {
private companion object {
const val TAG = "AudioEffectsEngine"
const val MAX_LOUDNESS_GAIN = 2000
const val KEY_EQ_ENABLED = "eq_enabled"
const val KEY_PRESET = "eq_preset"
const val KEY_BAND_PREFIX = "eq_band_"
@@ -6,6 +6,10 @@ import android.content.Intent
import android.media.AudioManager
import android.net.ConnectivityManager
import android.net.Network
import android.net.wifi.WifiManager
import android.os.Handler
import android.os.Looper
import android.os.PowerManager
import android.os.SystemClock
import android.util.Log
import androidx.annotation.OptIn
@@ -17,6 +21,7 @@ import androidx.media3.common.PlaybackException
import androidx.media3.common.Player
import androidx.media3.common.util.UnstableApi
import androidx.media3.datasource.DefaultHttpDataSource
import androidx.media3.datasource.HttpDataSource
import androidx.media3.exoplayer.DefaultLoadControl
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.exoplayer.source.DefaultMediaSourceFactory
@@ -60,6 +65,15 @@ class FogwavePlaybackService : MediaLibraryService() {
private var connectivityManager: ConnectivityManager? = null
private var networkCallback: ConnectivityManager.NetworkCallback? = null
private var defaultNetwork: Network? = null
// ExoPlayer drops its own wake and Wi-Fi locks once the player is idle after an error, so the
// backoff delay would stall while the CPU sleeps. These are held only while a reconnect is pending.
private var reconnectWakeLock: PowerManager.WakeLock? = null
private var reconnectWifiLock: WifiManager.WifiLock? = null
private val mainHandler = Handler(Looper.getMainLooper())
private var destroyed = false
private val httpDataSourceFactory: DefaultHttpDataSource.Factory by lazy {
DefaultHttpDataSource.Factory()
@@ -71,7 +85,9 @@ class FogwavePlaybackService : MediaLibraryService() {
}
private val loadControl = DefaultLoadControl.Builder()
.setBufferDurationsMs(5_000, 15_000, 500, 1_000)
// Quick start (0.5 s), but after a stall wait for 2.5 s of audio so a weak network does not
// turn into a play-stall-play stutter.
.setBufferDurationsMs(15_000, 50_000, 500, 2_500)
.setPrioritizeTimeOverSizeThresholds(true)
.build()
@@ -166,6 +182,7 @@ class FogwavePlaybackService : MediaLibraryService() {
if (retryAttempt != 0) Log.d(TAG, "Reconnect succeeded - resetting backoff")
retryAttempt = 0
retryJob?.cancel()
releaseReconnectLocks()
}
}
@@ -179,6 +196,7 @@ class FogwavePlaybackService : MediaLibraryService() {
Log.d(TAG, "Reconnect cancelled - playWhenReady=false (reason=$reason)")
}
retryJob?.cancel()
releaseReconnectLocks()
pausedAtMs = SystemClock.elapsedRealtime()
return
}
@@ -203,20 +221,39 @@ class FogwavePlaybackService : MediaLibraryService() {
"mediaItem=${lastRequestedItem?.localConfiguration?.uri}",
error
)
scheduleReconnect()
scheduleReconnect(maxAttempts = maxRetryAttemptsFor(error))
}
}
private fun scheduleReconnect(immediate: Boolean = false) {
// A missing stream or an unsupported format will not fix itself, so it gets only a couple of
// attempts (a stale token or a short server outage can still recover); network errors get the full backoff.
private fun maxRetryAttemptsFor(error: PlaybackException): Int {
val httpCode = (error.cause as? HttpDataSource.InvalidResponseCodeException)?.responseCode
val permanent = when (error.errorCode) {
PlaybackException.ERROR_CODE_IO_BAD_HTTP_STATUS ->
httpCode != null && httpCode in 400..499 && httpCode != 408 && httpCode != 429
PlaybackException.ERROR_CODE_IO_FILE_NOT_FOUND,
PlaybackException.ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED,
PlaybackException.ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED,
PlaybackException.ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED,
PlaybackException.ERROR_CODE_DECODING_FORMAT_UNSUPPORTED -> true
else -> false
}
return if (permanent) MAX_PERMANENT_ERROR_RETRY_ATTEMPTS else MAX_RETRY_ATTEMPTS
}
private fun scheduleReconnect(immediate: Boolean = false, maxAttempts: Int = MAX_RETRY_ATTEMPTS) {
retryJob?.cancel()
if (!immediate && retryAttempt >= MAX_RETRY_ATTEMPTS) {
if (!immediate && retryAttempt >= maxAttempts) {
// Give up instead of keeping the device busy forever; the error stays visible and a tap
// on play starts over.
Log.w(TAG, "Reconnect abandoned after $retryAttempt attempts")
retryAttempt = 0
releaseReconnectLocks()
player.pause()
return
}
acquireReconnectLocks()
val delayMs = if (immediate) 0L else retryDelaysMs.getOrElse(retryAttempt) { retryDelaysMs.last() }
retryAttempt++
Log.d(TAG, "Reconnect scheduled in ${delayMs}ms (attempt=$retryAttempt)")
@@ -224,6 +261,7 @@ class FogwavePlaybackService : MediaLibraryService() {
delay(delayMs)
if (!player.playWhenReady) {
Log.d(TAG, "Reconnect skipped - no longer playWhenReady")
releaseReconnectLocks()
return@launch
}
restartStream()
@@ -247,6 +285,34 @@ class FogwavePlaybackService : MediaLibraryService() {
}
}
@Suppress("DEPRECATION") // WIFI_MODE_FULL_HIGH_PERF is what ExoPlayer itself uses for streaming.
private fun acquireReconnectLocks() {
try {
if (reconnectWakeLock == null) {
val pm = getSystemService(Context.POWER_SERVICE) as? PowerManager
reconnectWakeLock = pm?.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Fogwave:reconnect")
?.apply { setReferenceCounted(false) }
}
// The timeout is a safety net; the lock is released as soon as the stream is back.
reconnectWakeLock?.acquire(RECONNECT_LOCK_TIMEOUT_MS)
if (reconnectWifiLock == null) {
val wm = applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
reconnectWifiLock = wm?.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "Fogwave:reconnect")
?.apply { setReferenceCounted(false) }
}
val wifiLock = reconnectWifiLock
if (wifiLock != null && !wifiLock.isHeld) wifiLock.acquire()
} catch (e: Exception) {
Log.w(TAG, "Could not acquire reconnect locks", e)
}
}
private fun releaseReconnectLocks() {
try { reconnectWakeLock?.takeIf { it.isHeld }?.release() } catch (_: Exception) {}
try { reconnectWifiLock?.takeIf { it.isHeld }?.release() } catch (_: Exception) {}
}
private fun registerNetworkCallback() {
val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager ?: return
connectivityManager = cm
@@ -254,8 +320,15 @@ class FogwavePlaybackService : MediaLibraryService() {
// Called on a ConnectivityManager thread; ExoPlayer must only be accessed on the main thread.
override fun onAvailable(network: Network) {
serviceScope.launch {
if (retryJob?.isActive == true && player.playWhenReady && player.playbackState != Player.STATE_READY) {
Log.d(TAG, "Network available again - reconnecting immediately")
val previous = defaultNetwork
defaultNetwork = network
if (!player.playWhenReady || player.playbackState == Player.STATE_READY) return@launch
// After a switch (e.g. Wi-Fi to mobile) a stalled load can sit on a dead socket until
// the read timeout, so reopen right away instead of waiting for the error.
val switchedWhileStalled = previous != null && previous != network &&
player.playbackState == Player.STATE_BUFFERING
if (retryJob?.isActive == true || switchedWhileStalled) {
Log.d(TAG, "Network available - reconnecting immediately")
scheduleReconnect(immediate = true)
}
}
@@ -300,9 +373,7 @@ class FogwavePlaybackService : MediaLibraryService() {
}
Log.d(TAG, "Audio session id for effects: ${player.audioSessionId}")
audioEffectsEngine = AudioEffectsEngine(applicationContext, player.audioSessionId).also {
AudioEffectsController.attach(it)
}
createAudioEffectsAsync(player.audioSessionId)
registerNetworkCallback()
@@ -319,6 +390,26 @@ class FogwavePlaybackService : MediaLibraryService() {
.build()
}
// Creating the effects means several calls into audioserver; done off the main thread so the
// service, which starts together with the UI, does not delay the first frames.
private fun createAudioEffectsAsync(audioSessionId: Int) {
Thread({
try {
val engine = AudioEffectsEngine(applicationContext, audioSessionId)
mainHandler.post {
if (destroyed) {
engine.release()
} else {
audioEffectsEngine = engine
AudioEffectsController.attach(engine)
}
}
} catch (e: Exception) {
Log.e(TAG, "Audio effects init failed", e)
}
}, "FogwaveEffectsInit").start()
}
override fun onGetSession(controllerInfo: MediaSession.ControllerInfo): MediaLibrarySession? = mediaLibrarySession
override fun onTaskRemoved(rootIntent: Intent?) {
@@ -329,7 +420,9 @@ class FogwavePlaybackService : MediaLibraryService() {
}
override fun onDestroy() {
destroyed = true
retryJob?.cancel()
releaseReconnectLocks()
serviceScope.cancel()
networkCallback?.let { cb ->
try { connectivityManager?.unregisterNetworkCallback(cb) } catch (_: Exception) {}
@@ -349,6 +442,8 @@ class FogwavePlaybackService : MediaLibraryService() {
private const val ROOT_ID = "fogwave_root"
private const val TAG = "FogwavePlaybackService"
private const val MAX_RETRY_ATTEMPTS = 12
private const val MAX_PERMANENT_ERROR_RETRY_ATTEMPTS = 2
private const val RECONNECT_LOCK_TIMEOUT_MS = 2 * 60_000L
private const val LIVE_RESYNC_AFTER_MS = 30_000L
}
}
@@ -48,6 +48,17 @@ class RadioPlayerManager(private val context: Context) {
}
}
// Without this a controller whose session went away stays non-null and every command is
// silently dropped, leaving the UI stuck on "connecting".
private val controllerListener = object : MediaController.Listener {
override fun onDisconnected(controller: MediaController) {
if (released || controller !== this@RadioPlayerManager.controller) return
Log.w(TAG, "MediaController disconnected")
dropController()
_playerState.value = PlayerState.Idle
}
}
// Declared after every property it touches so that nothing is read before initialization.
init {
connectToPlaybackService()
@@ -56,7 +67,9 @@ class RadioPlayerManager(private val context: Context) {
private fun connectToPlaybackService() {
if (released || controllerFuture != null) return
val sessionToken = SessionToken(context, ComponentName(context, FogwavePlaybackService::class.java))
val future = MediaController.Builder(context, sessionToken).buildAsync()
val future = MediaController.Builder(context, sessionToken)
.setListener(controllerListener)
.buildAsync()
controllerFuture = future
future.addListener({
if (released) return@addListener
@@ -83,6 +96,21 @@ class RadioPlayerManager(private val context: Context) {
}, MoreExecutors.directExecutor())
}
/** The controller if it is still connected; a stale one is dropped so the next call reconnects. */
private fun connectedController(): MediaController? {
val c = controller ?: return null
if (c.isConnected) return c
dropController()
return null
}
private fun dropController() {
controller?.removeListener(playerListener)
controller = null
controllerFuture?.let { MediaController.releaseFuture(it) }
controllerFuture = null
}
private fun deriveState(p: Player): PlayerState {
p.playerError?.let { return PlayerState.Error(errorMessage(it)) }
return when (p.playbackState) {
@@ -108,7 +136,7 @@ class RadioPlayerManager(private val context: Context) {
fun playStation(station: RadioStation) {
Log.d(TAG, "Station requested: ${station.id}")
currentStation = station
val c = controller
val c = connectedController()
if (c == null) {
pendingStation = station
_playerState.value = PlayerState.Connecting
@@ -127,7 +155,7 @@ class RadioPlayerManager(private val context: Context) {
}
fun play() {
val c = controller
val c = connectedController()
when {
c == null || c.mediaItemCount == 0 -> currentStation?.let { playStation(it) }
// A failed, stopped or finished live stream has to be reopened rather than resumed.
@@ -5,12 +5,15 @@ import android.content.Context
import androidx.core.net.toUri
import androidx.media3.common.MediaItem
import androidx.media3.common.MediaMetadata
import androidx.media3.common.MimeTypes
import cc.skysparkle.fogwave.data.model.RadioStation
fun RadioStation.toMediaItem(context: Context): MediaItem {
val artworkUri = "${ContentResolver.SCHEME_ANDROID_RESOURCE}://${context.packageName}/$iconResId".toUri()
return MediaItem.Builder()
.setUri(streamUrl)
// HLS playlists are picked up by the HLS module; everything else stays a progressive stream.
.apply { if (streamUrl.substringBefore('?').endsWith(".m3u8")) setMimeType(MimeTypes.APPLICATION_M3U8) }
.setMediaId(id)
.setMediaMetadata(
MediaMetadata.Builder()
@@ -46,7 +46,7 @@ private val LIBRARIES = listOf(
LicenseRow("AndroidX Activity Compose", AOSP, APACHE, "https://developer.android.com/jetpack/androidx/releases/activity", BuildConfig.ACTIVITY_VERSION),
LicenseRow("AndroidX Core KTX", AOSP, APACHE, "https://developer.android.com/jetpack/androidx/releases/core", BuildConfig.CORE_KTX_VERSION),
LicenseRow("AndroidX Lifecycle (ViewModel + Runtime Compose)", AOSP, APACHE, "https://developer.android.com/jetpack/androidx/releases/lifecycle", BuildConfig.LIFECYCLE_VERSION),
LicenseRow("AndroidX Media3 (ExoPlayer, MediaSession)", AOSP, APACHE, "https://developer.android.com/jetpack/androidx/releases/media3", BuildConfig.MEDIA3_VERSION),
LicenseRow("AndroidX Media3 (ExoPlayer, HLS, MediaSession)", AOSP, APACHE, "https://developer.android.com/jetpack/androidx/releases/media3", BuildConfig.MEDIA3_VERSION),
LicenseRow("AndroidX \u2014 other libraries pulled in by the ones above", AOSP, APACHE, "https://developer.android.com/jetpack/androidx"),
LicenseRow("Guava (used by Media3)", "Google", APACHE, "https://github.com/google/guava"),
LicenseRow("kotlinx.coroutines", "JetBrains", APACHE, "https://github.com/Kotlin/kotlinx.coroutines", BuildConfig.COROUTINES_VERSION),
@@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.selection.selectable
@@ -62,7 +63,8 @@ fun StationsToolbar(
onSelectViewMode: (ViewMode) -> Unit,
sizeStep: IconSizeStep,
onSelectSizeStep: (IconSizeStep) -> Unit,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
showViewOptions: Boolean = true
) {
Column(
modifier = modifier
@@ -70,7 +72,8 @@ fun StationsToolbar(
.padding(horizontal = 20.dp, vertical = 6.dp)
) {
Row(
modifier = Modifier.fillMaxWidth(),
// Same height with or without the view button, so the title does not jump between tabs.
modifier = Modifier.fillMaxWidth().heightIn(min = 38.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
@@ -89,27 +92,29 @@ fun StationsToolbar(
.padding(end = 12.dp)
)
Box(
modifier = Modifier
.size(38.dp)
.clip(RoundedCornerShape(12.dp))
.background(if (isOpen) LocalGeoColors.current.primaryContainer else LocalGeoColors.current.surfaceContainer)
.border(1.dp, LocalGeoColors.current.outlineVariant, RoundedCornerShape(12.dp))
.clickable(role = Role.Button) { onToggleOpen() }
.testTag("view_options_trigger"),
contentAlignment = Alignment.Center
) {
AppIcon(
resId = R.drawable.ic_table,
contentDescription = stringResource(R.string.view_mode_content_desc),
tint = if (isOpen) LocalGeoColors.current.deepPurple else LocalGeoColors.current.onSurfaceVariant,
size = 19.dp
)
if (showViewOptions) {
Box(
modifier = Modifier
.size(38.dp)
.clip(RoundedCornerShape(12.dp))
.background(if (isOpen) LocalGeoColors.current.primaryContainer else LocalGeoColors.current.surfaceContainer)
.border(1.dp, LocalGeoColors.current.outlineVariant, RoundedCornerShape(12.dp))
.clickable(role = Role.Button) { onToggleOpen() }
.testTag("view_options_trigger"),
contentAlignment = Alignment.Center
) {
AppIcon(
resId = R.drawable.ic_table,
contentDescription = stringResource(R.string.view_mode_content_desc),
tint = if (isOpen) LocalGeoColors.current.deepPurple else LocalGeoColors.current.onSurfaceVariant,
size = 19.dp
)
}
}
}
AnimatedVisibility(
visible = isOpen,
visible = isOpen && showViewOptions,
enter = expandVertically(
animationSpec = spring(dampingRatio = 0.85f, stiffness = Spring.StiffnessMediumLow),
expandFrom = Alignment.Top
@@ -128,7 +128,9 @@ fun HomeScreen(
viewMode = uiState.viewMode,
onSelectViewMode = { viewModel.setViewMode(it) },
sizeStep = uiState.sizeStep,
onSelectSizeStep = { viewModel.setSizeStep(it) }
onSelectSizeStep = { viewModel.setSizeStep(it) },
// View options live on the Radio tab only; Favorites follows that choice.
showViewOptions = !isFavorites
)
Box(modifier = Modifier.weight(1f)) {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Musik &amp; Hit-Klassiker</string>
<string name="station_desc_goldfm">Goldene Hits</string>
<string name="station_desc_rc">Radiocentras • Litauen</string>
<string name="station_desc_lrt">Litauischer öffentlicher Rundfunk • Nachrichten</string>
<string name="station_desc_ziniu">Wirtschaftsnachrichten &amp; Talk • Litauen</string>
<string name="station_desc_lr1">Öffentliche Nachrichten &amp; Talk • Lettland</string>
<string name="station_desc_lr2">Lettische Musik • Lettland</string>
<string name="genre_hits">Hits</string>
<string name="genre_pop">Pop</string>
<string name="genre_dance">Dance</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">Rock</string>
<string name="genre_easy_listening">Easy Listening</string>
<string name="genre_lithuanian">Litauische Musik</string>
<string name="genre_news_talk">Nachrichten &amp; Talk</string>
<string name="genre_latvian">Lettische Musik</string>
<string name="eq_preset_normal">Normal</string>
<string name="eq_preset_classical">Klassik</string>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">音楽と往年のヒット曲</string>
<string name="station_desc_goldfm">ゴールデンヒット</string>
<string name="station_desc_rc">Radiocentras • リトアニア</string>
<string name="station_desc_lrt">リトアニア公共放送 • ニュース</string>
<string name="station_desc_ziniu">ビジネスニュース・トーク • リトアニア</string>
<string name="station_desc_lr1">公共ニュース・トーク • ラトビア</string>
<string name="station_desc_lr2">ラトビア音楽 • ラトビア</string>
<string name="genre_hits">ヒット曲</string>
<string name="genre_pop">ポップ</string>
<string name="genre_dance">ダンス</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">ロック</string>
<string name="genre_easy_listening">イージーリスニング</string>
<string name="genre_lithuanian">リトアニア音楽</string>
<string name="genre_news_talk">ニュース・トーク</string>
<string name="genre_latvian">ラトビア音楽</string>
<string name="eq_preset_normal">ノーマル</string>
<string name="eq_preset_classical">クラシック</string>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Muzika ir klasikiniai hitai</string>
<string name="station_desc_goldfm">Auksiniai hitai</string>
<string name="station_desc_rc">Radiocentras • Lietuva</string>
<string name="station_desc_lrt">Lietuvos visuomeninis radijas • Žinios</string>
<string name="station_desc_ziniu">Verslo žinios ir pokalbiai • Lietuva</string>
<string name="station_desc_lr1">Visuomeninės žinios ir pokalbiai • Latvija</string>
<string name="station_desc_lr2">Latviška muzika • Latvija</string>
<string name="genre_hits">Hitai</string>
<string name="genre_pop">Pop</string>
<string name="genre_dance">Šokių</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">Rokas</string>
<string name="genre_easy_listening">Lengvoji muzika</string>
<string name="genre_lithuanian">Lietuviška muzika</string>
<string name="genre_news_talk">Žinios ir pokalbiai</string>
<string name="genre_latvian">Latviška muzika</string>
<string name="eq_preset_normal">Įprastas</string>
<string name="eq_preset_classical">Klasika</string>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Музыка и хиты прошлых лет</string>
<string name="station_desc_goldfm">Золотые хиты</string>
<string name="station_desc_rc">Radiocentras • Литва</string>
<string name="station_desc_lrt">Общественное радио Литвы • Новости</string>
<string name="station_desc_ziniu">Деловые новости и ток-шоу • Литва</string>
<string name="station_desc_lr1">Общественные новости и ток-шоу • Латвия</string>
<string name="station_desc_lr2">Латышская музыка • Латвия</string>
<string name="genre_hits">Хиты</string>
<string name="genre_pop">Поп</string>
<string name="genre_dance">Танцевальная</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">Рок</string>
<string name="genre_easy_listening">Лёгкая музыка</string>
<string name="genre_lithuanian">Литовская музыка</string>
<string name="genre_news_talk">Новости и разговорное</string>
<string name="genre_latvian">Латышская музыка</string>
<string name="eq_preset_normal">Обычный</string>
<string name="eq_preset_classical">Классика</string>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">音乐与经典金曲</string>
<string name="station_desc_goldfm">黄金金曲</string>
<string name="station_desc_rc">Radiocentras • 立陶宛</string>
<string name="station_desc_lrt">立陶宛公共广播 • 新闻</string>
<string name="station_desc_ziniu">商业新闻与谈话 • 立陶宛</string>
<string name="station_desc_lr1">公共新闻与谈话 • 拉脱维亚</string>
<string name="station_desc_lr2">拉脱维亚音乐 • 拉脱维亚</string>
<string name="genre_hits">热门</string>
<string name="genre_pop">流行</string>
<string name="genre_dance">舞曲</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">摇滚</string>
<string name="genre_easy_listening">轻音乐</string>
<string name="genre_lithuanian">立陶宛音乐</string>
<string name="genre_news_talk">新闻与谈话</string>
<string name="genre_latvian">拉脱维亚音乐</string>
<string name="eq_preset_normal">正常</string>
<string name="eq_preset_classical">古典</string>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Music &amp; classic hits</string>
<string name="station_desc_goldfm">Golden hits</string>
<string name="station_desc_rc">Radiocentras • Lithuania</string>
<string name="station_desc_lrt">Lithuanian public radio • News</string>
<string name="station_desc_ziniu">Business news &amp; talk • Lithuania</string>
<string name="station_desc_lr1">Public news &amp; talk • Latvia</string>
<string name="station_desc_lr2">Latvian music • Latvia</string>
<string name="genre_hits">Hits</string>
<string name="genre_pop">Pop</string>
<string name="genre_dance">Dance</string>
@@ -95,6 +99,8 @@
<string name="genre_rock">Rock</string>
<string name="genre_easy_listening">Easy listening</string>
<string name="genre_lithuanian">Lithuanian music</string>
<string name="genre_news_talk">News &amp; talk</string>
<string name="genre_latvian">Latvian music</string>
<string name="eq_preset_normal">Normal</string>
<string name="eq_preset_classical">Classical</string>
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Some files were not shown because too many files have changed in this diff Show More