Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe77813e53 | ||
|
|
13acbc6d6a | ||
|
|
46a3f94057 | ||
|
|
cca6d5e19c | ||
|
|
5561754a71 | ||
|
|
f84df8b21e | ||
|
|
197ac2784c | ||
|
|
237be98cf0 | ||
|
|
91e5467d11 | ||
|
|
d9b12c9899 | ||
|
|
9efb12a25f | ||
|
|
52af3a7f4c | ||
|
|
ae47b574c1 | ||
|
|
8e815865da | ||
|
|
50ac9f9886 | ||
|
|
fa2fda44d1 | ||
|
|
6a819880e2 | ||
|
|
5fe3a0af0b | ||
|
|
ac64478773 | ||
|
|
62df72f9b8 | ||
|
|
1eae2c8493 | ||
|
|
440fbec8e3 | ||
|
|
61fa65b080 | ||
|
|
5bd0d96a92 | ||
|
|
e4a36b6cfa | ||
|
|
4454a422bb | ||
|
|
2900470e90 | ||
|
|
f86d8cc70d | ||
|
|
6485a51249 | ||
|
|
1b52c5dbab | ||
|
|
7482217528 | ||
|
|
e3aa92d346 | ||
|
|
be11ae190d |
@@ -1,3 +1,4 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
gradlew text eol=lf
|
gradlew text eol=lf
|
||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
||||||
*.jar binary
|
*.jar binary
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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:
|
||||||
@@ -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
|
||||||
@@ -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)
|
||||||
|
|
||||||
@@ -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.
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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:
|
||||||
@@ -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
|
||||||
@@ -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` |
|
|
||||||
@@ -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.
|
||||||
@@ -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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, version 3 of the License.
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
|||||||
@@ -1,99 +1,92 @@
|
|||||||
<p align="center">
|
<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>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">Fogwave</h1>
|
<h1 align="center">Fogwave</h1>
|
||||||
|
|
||||||
<p align="center">
|
<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>
|
||||||
|
|
||||||
<p align="center">
|
<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>
|
</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
|
- 🎧 **Background playback** with lock-screen, notification, headphone and Bluetooth controls
|
||||||
- 🚗 **Android Auto** support
|
- 🚗 **Android Auto** support
|
||||||
- 🔄 **Auto-reconnect** when the stream drops or the network comes back
|
- 🔄 **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
|
- ❤️ **Favorites, recently played and similar stations** matched by genre
|
||||||
- 🗂️ **Four layouts** — list, table, tiles or icons, with adjustable size
|
- 🗂️ **Four layouts** — list, table, tiles or icons, with adjustable size
|
||||||
- 🌙 **Clean, elegant UI** in a dark theme
|
- 🌙 **Dark theme**
|
||||||
- 🌍 Available in English, Russian, German, Japanese, Lithuanian, and Chinese
|
- 🌍 **Six languages** — English, Russian, German, Japanese, Lithuanian and Chinese
|
||||||
- 🔓 **100% open source** — no ads, no tracking, no accounts
|
- 🔓 **No ads, no tracking, no accounts**
|
||||||
|
|
||||||
## Screenshots
|
## <img src="assets/icon-install.png" width="32" alt=""> Installation
|
||||||
|
|
||||||
<p align="center">
|
- **[F-Droid](https://f-droid.org/packages/cc.skysparkle.fogwave/)** — install and update through the F-Droid client.
|
||||||
<img src="assets/screenshots/5-feel-closer.png" width="200" alt="Feel closer to Lithuania">
|
- **[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.
|
||||||
<img src="assets/screenshots/4-stations.png" width="200" alt="Browse all stations">
|
- **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.
|
||||||
<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>
|
|
||||||
|
|
||||||
## Installation
|
## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download
|
||||||
|
|
||||||
<img src="assets/icon-install.png" width="36" align="left">
|
Every official APK is signed with the same key. Check it before installing:
|
||||||
|
|
||||||
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):
|
|
||||||
|
|
||||||
```sh
|
```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">
|
```
|
||||||
|
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
|
||||||
Compare the SHA-256 checksum against the value listed in [CHANGELOG.md](CHANGELOG.md):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sha256sum Fogwawe-v1.0.10.apk
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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
|
```sh
|
||||||
./gradlew assembleDebug
|
./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
|
||||||
|
|
||||||
```
|
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.
|
||||||
.
|
|
||||||
├── 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
|
|
||||||
```
|
|
||||||
|
|
||||||
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
|
[GNU General Public License v3.0 only](LICENSE).
|
||||||
|
|
||||||
This project is licensed under the **GNU General Public License v3.0** — see the [LICENSE](LICENSE) file for details.
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ android {
|
|||||||
applicationId = "cc.skysparkle.fogwave"
|
applicationId = "cc.skysparkle.fogwave"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 11
|
versionCode = 13
|
||||||
versionName = "1.0.11"
|
versionName = "1.0.13"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@@ -85,6 +85,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation(libs.coil.compose)
|
implementation(libs.coil.compose)
|
||||||
implementation(libs.androidx.media3.exoplayer)
|
implementation(libs.androidx.media3.exoplayer)
|
||||||
|
implementation(libs.androidx.media3.exoplayer.hls)
|
||||||
implementation(libs.androidx.media3.common)
|
implementation(libs.androidx.media3.common)
|
||||||
implementation(libs.androidx.media3.session)
|
implementation(libs.androidx.media3.session)
|
||||||
implementation(libs.kotlinx.coroutines.android)
|
implementation(libs.kotlinx.coroutines.android)
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ enum class Genre(@param:StringRes val labelRes: Int) {
|
|||||||
OLDIES(R.string.genre_oldies),
|
OLDIES(R.string.genre_oldies),
|
||||||
ROCK(R.string.genre_rock),
|
ROCK(R.string.genre_rock),
|
||||||
EASY_LISTENING(R.string.genre_easy_listening),
|
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 {
|
enum class ViewMode {
|
||||||
|
|||||||
@@ -110,6 +110,43 @@ class RadioRepository(context: Context) {
|
|||||||
genres = listOf(Genre.HITS, Genre.LITHUANIAN),
|
genres = listOf(Genre.HITS, Genre.LITHUANIAN),
|
||||||
bitrate = "MP3 128 kbps",
|
bitrate = "MP3 128 kbps",
|
||||||
lightBackdrop = true
|
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
|
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) {
|
class AudioEffectsEngine(context: Context, audioSessionId: Int) {
|
||||||
private val prefs: SharedPreferences =
|
private val prefs: SharedPreferences =
|
||||||
context.applicationContext.getSharedPreferences("fogwave_audio_effects", Context.MODE_PRIVATE)
|
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 loudnessEnhancer: LoudnessEnhancer? = null
|
||||||
private var dynamicsProcessing: DynamicsProcessing? = 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 {
|
init {
|
||||||
try {
|
try {
|
||||||
equalizer = Equalizer(0, audioSessionId).apply {
|
equalizer = Equalizer(0, audioSessionId).apply {
|
||||||
for (p in 0 until numberOfPresets) {
|
presetNames = (0 until numberOfPresets).map { getPresetName(it.toShort()) }
|
||||||
presetNames.add(getPresetName(p.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
|
val preset = currentPresetIndex
|
||||||
if (preset in 0 until numberOfPresets) {
|
if (preset in 0 until numberOfPresets) {
|
||||||
usePreset(preset.toShort())
|
usePreset(preset.toShort())
|
||||||
} else {
|
} else {
|
||||||
for (b in 0 until numberOfBands) {
|
for (b in 0 until bandCount) {
|
||||||
val saved = prefs.getInt(KEY_BAND_PREFIX + b, Int.MIN_VALUE)
|
val saved = prefs.getInt(KEY_BAND_PREFIX + b, Int.MIN_VALUE)
|
||||||
if (saved != Int.MIN_VALUE) setBandLevel(b.toShort(), saved.toShort())
|
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) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "Equalizer unavailable", e)
|
Log.e(TAG, "Equalizer unavailable", e)
|
||||||
|
equalizer = null
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loudnessEnhancer = LoudnessEnhancer(audioSessionId).apply {
|
loudnessEnhancer = LoudnessEnhancer(audioSessionId).apply {
|
||||||
setTargetGain(prefs.getInt(KEY_LOUDNESS_GAIN, 0))
|
setTargetGain(loudnessGain)
|
||||||
enabled = prefs.getBoolean(KEY_LOUDNESS_ENABLED, false)
|
enabled = loudnessEnabled
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "LoudnessEnhancer unavailable", e)
|
Log.e(TAG, "LoudnessEnhancer unavailable", e)
|
||||||
|
loudnessEnhancer = null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
@@ -134,94 +152,103 @@ class AudioEffectsEngine(context: Context, audioSessionId: Int) {
|
|||||||
dp.setLimiterByChannelIndex(ch, limiter)
|
dp.setLimiterByChannelIndex(ch, limiter)
|
||||||
}
|
}
|
||||||
|
|
||||||
dp.enabled = prefs.getBoolean(KEY_DYNAMICS_ENABLED, false)
|
dp.enabled = dynamicsEnabled
|
||||||
return dp
|
return dp
|
||||||
}
|
}
|
||||||
|
|
||||||
fun currentState(): AudioEffectsState {
|
fun currentState(): AudioEffectsState {
|
||||||
val eq = equalizer
|
val eqAvailable = equalizer != null
|
||||||
val bands = if (eq != null) {
|
val bands = if (eqAvailable) {
|
||||||
(0 until eq.numberOfBands).map { i ->
|
bandLevels.indices.map { i ->
|
||||||
val idx = i.toShort()
|
|
||||||
val range = eq.bandLevelRange
|
|
||||||
EqualizerBand(
|
EqualizerBand(
|
||||||
index = i,
|
index = i,
|
||||||
centerFreqHz = eq.getCenterFreq(idx) / 1000,
|
centerFreqHz = centerFreqsHz[i],
|
||||||
levelMillibel = eq.getBandLevel(idx).toInt(),
|
levelMillibel = bandLevels[i],
|
||||||
minLevelMillibel = range[0].toInt(),
|
minLevelMillibel = minBandLevel,
|
||||||
maxLevelMillibel = range[1].toInt()
|
maxLevelMillibel = maxBandLevel
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else emptyList()
|
} else emptyList()
|
||||||
|
|
||||||
return AudioEffectsState(
|
return AudioEffectsState(
|
||||||
equalizerAvailable = eq != null,
|
equalizerAvailable = eqAvailable,
|
||||||
equalizerEnabled = eq?.enabled ?: false,
|
equalizerEnabled = eqAvailable && equalizerEnabled,
|
||||||
bands = bands,
|
bands = bands,
|
||||||
presets = presetNames,
|
presets = presetNames,
|
||||||
currentPreset = if (eq != null) currentPresetIndex else -1,
|
currentPreset = if (eqAvailable) currentPresetIndex else -1,
|
||||||
loudnessAvailable = loudnessEnhancer != null,
|
loudnessAvailable = loudnessEnhancer != null,
|
||||||
loudnessEnabled = loudnessEnhancer?.enabled ?: false,
|
loudnessEnabled = loudnessEnhancer != null && loudnessEnabled,
|
||||||
loudnessGainMillibel = try {
|
loudnessGainMillibel = if (loudnessEnhancer != null) loudnessGain.toFloat() else 0f,
|
||||||
loudnessEnhancer?.targetGain ?: 0f
|
|
||||||
} catch (_: Exception) {
|
|
||||||
0f
|
|
||||||
},
|
|
||||||
dynamicsProcessingAvailable = dynamicsProcessing != null,
|
dynamicsProcessingAvailable = dynamicsProcessing != null,
|
||||||
dynamicsProcessingEnabled = dynamicsProcessing?.enabled ?: false
|
dynamicsProcessingEnabled = dynamicsProcessing != null && dynamicsEnabled
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setEqualizerEnabled(enabled: Boolean) {
|
fun setEqualizerEnabled(enabled: Boolean) {
|
||||||
|
val eq = equalizer ?: return
|
||||||
try {
|
try {
|
||||||
equalizer?.enabled = enabled
|
eq.enabled = enabled
|
||||||
|
equalizerEnabled = enabled
|
||||||
prefs.edit { putBoolean(KEY_EQ_ENABLED, enabled) }
|
prefs.edit { putBoolean(KEY_EQ_ENABLED, enabled) }
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setBandLevel(band: Int, levelMillibel: Int) {
|
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 {
|
try {
|
||||||
equalizer?.setBandLevel(band.toShort(), levelMillibel.toShort())
|
eq.setBandLevel(band.toShort(), level.toShort())
|
||||||
|
bandLevels[band] = level
|
||||||
currentPresetIndex = -1
|
currentPresetIndex = -1
|
||||||
prefs.edit {
|
prefs.edit {
|
||||||
putInt(KEY_BAND_PREFIX + band, levelMillibel)
|
putInt(KEY_BAND_PREFIX + band, level)
|
||||||
putInt(KEY_PRESET, -1)
|
putInt(KEY_PRESET, -1)
|
||||||
}
|
}
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setPreset(preset: Int) {
|
fun setPreset(preset: Int) {
|
||||||
|
val eq = equalizer ?: return
|
||||||
try {
|
try {
|
||||||
val eq = equalizer ?: return
|
|
||||||
eq.usePreset(preset.toShort())
|
eq.usePreset(preset.toShort())
|
||||||
currentPresetIndex = preset
|
currentPresetIndex = preset
|
||||||
|
for (b in bandLevels.indices) {
|
||||||
|
bandLevels[b] = eq.getBandLevel(b.toShort()).toInt()
|
||||||
|
}
|
||||||
prefs.edit {
|
prefs.edit {
|
||||||
putInt(KEY_PRESET, preset)
|
putInt(KEY_PRESET, preset)
|
||||||
for (b in 0 until eq.numberOfBands) {
|
for (b in bandLevels.indices) putInt(KEY_BAND_PREFIX + b, bandLevels[b])
|
||||||
putInt(KEY_BAND_PREFIX + b, eq.getBandLevel(b.toShort()).toInt())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setLoudnessEnabled(enabled: Boolean) {
|
fun setLoudnessEnabled(enabled: Boolean) {
|
||||||
|
val le = loudnessEnhancer ?: return
|
||||||
try {
|
try {
|
||||||
loudnessEnhancer?.enabled = enabled
|
le.enabled = enabled
|
||||||
|
loudnessEnabled = enabled
|
||||||
prefs.edit { putBoolean(KEY_LOUDNESS_ENABLED, enabled) }
|
prefs.edit { putBoolean(KEY_LOUDNESS_ENABLED, enabled) }
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setLoudnessGain(gainMillibel: Float) {
|
fun setLoudnessGain(gainMillibel: Float) {
|
||||||
|
val le = loudnessEnhancer ?: return
|
||||||
|
val gain = gainMillibel.coerceIn(0f, MAX_LOUDNESS_GAIN.toFloat()).toInt()
|
||||||
|
if (gain == loudnessGain) return
|
||||||
try {
|
try {
|
||||||
val gain = gainMillibel.coerceIn(0f, 2000f).toInt()
|
le.setTargetGain(gain)
|
||||||
loudnessEnhancer?.setTargetGain(gain)
|
loudnessGain = gain
|
||||||
prefs.edit { putInt(KEY_LOUDNESS_GAIN, gain) }
|
prefs.edit { putInt(KEY_LOUDNESS_GAIN, gain) }
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setDynamicsProcessingEnabled(enabled: Boolean) {
|
fun setDynamicsProcessingEnabled(enabled: Boolean) {
|
||||||
|
val dp = dynamicsProcessing ?: return
|
||||||
try {
|
try {
|
||||||
dynamicsProcessing?.enabled = enabled
|
dp.enabled = enabled
|
||||||
|
dynamicsEnabled = enabled
|
||||||
prefs.edit { putBoolean(KEY_DYNAMICS_ENABLED, enabled) }
|
prefs.edit { putBoolean(KEY_DYNAMICS_ENABLED, enabled) }
|
||||||
} catch (_: Exception) {}
|
} catch (_: Exception) {}
|
||||||
}
|
}
|
||||||
@@ -237,6 +264,7 @@ class AudioEffectsEngine(context: Context, audioSessionId: Int) {
|
|||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
const val TAG = "AudioEffectsEngine"
|
const val TAG = "AudioEffectsEngine"
|
||||||
|
const val MAX_LOUDNESS_GAIN = 2000
|
||||||
const val KEY_EQ_ENABLED = "eq_enabled"
|
const val KEY_EQ_ENABLED = "eq_enabled"
|
||||||
const val KEY_PRESET = "eq_preset"
|
const val KEY_PRESET = "eq_preset"
|
||||||
const val KEY_BAND_PREFIX = "eq_band_"
|
const val KEY_BAND_PREFIX = "eq_band_"
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import android.content.Intent
|
|||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
import android.net.Network
|
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.os.SystemClock
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.annotation.OptIn
|
import androidx.annotation.OptIn
|
||||||
@@ -17,6 +21,7 @@ import androidx.media3.common.PlaybackException
|
|||||||
import androidx.media3.common.Player
|
import androidx.media3.common.Player
|
||||||
import androidx.media3.common.util.UnstableApi
|
import androidx.media3.common.util.UnstableApi
|
||||||
import androidx.media3.datasource.DefaultHttpDataSource
|
import androidx.media3.datasource.DefaultHttpDataSource
|
||||||
|
import androidx.media3.datasource.HttpDataSource
|
||||||
import androidx.media3.exoplayer.DefaultLoadControl
|
import androidx.media3.exoplayer.DefaultLoadControl
|
||||||
import androidx.media3.exoplayer.ExoPlayer
|
import androidx.media3.exoplayer.ExoPlayer
|
||||||
import androidx.media3.exoplayer.source.DefaultMediaSourceFactory
|
import androidx.media3.exoplayer.source.DefaultMediaSourceFactory
|
||||||
@@ -60,6 +65,15 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
|
|
||||||
private var connectivityManager: ConnectivityManager? = null
|
private var connectivityManager: ConnectivityManager? = null
|
||||||
private var networkCallback: ConnectivityManager.NetworkCallback? = 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 {
|
private val httpDataSourceFactory: DefaultHttpDataSource.Factory by lazy {
|
||||||
DefaultHttpDataSource.Factory()
|
DefaultHttpDataSource.Factory()
|
||||||
@@ -71,7 +85,9 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val loadControl = DefaultLoadControl.Builder()
|
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)
|
.setPrioritizeTimeOverSizeThresholds(true)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
@@ -166,6 +182,7 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
if (retryAttempt != 0) Log.d(TAG, "Reconnect succeeded - resetting backoff")
|
if (retryAttempt != 0) Log.d(TAG, "Reconnect succeeded - resetting backoff")
|
||||||
retryAttempt = 0
|
retryAttempt = 0
|
||||||
retryJob?.cancel()
|
retryJob?.cancel()
|
||||||
|
releaseReconnectLocks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,6 +196,7 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
Log.d(TAG, "Reconnect cancelled - playWhenReady=false (reason=$reason)")
|
Log.d(TAG, "Reconnect cancelled - playWhenReady=false (reason=$reason)")
|
||||||
}
|
}
|
||||||
retryJob?.cancel()
|
retryJob?.cancel()
|
||||||
|
releaseReconnectLocks()
|
||||||
pausedAtMs = SystemClock.elapsedRealtime()
|
pausedAtMs = SystemClock.elapsedRealtime()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -203,20 +221,39 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
"mediaItem=${lastRequestedItem?.localConfiguration?.uri}",
|
"mediaItem=${lastRequestedItem?.localConfiguration?.uri}",
|
||||||
error
|
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()
|
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
|
// Give up instead of keeping the device busy forever; the error stays visible and a tap
|
||||||
// on play starts over.
|
// on play starts over.
|
||||||
Log.w(TAG, "Reconnect abandoned after $retryAttempt attempts")
|
Log.w(TAG, "Reconnect abandoned after $retryAttempt attempts")
|
||||||
retryAttempt = 0
|
retryAttempt = 0
|
||||||
|
releaseReconnectLocks()
|
||||||
player.pause()
|
player.pause()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
acquireReconnectLocks()
|
||||||
val delayMs = if (immediate) 0L else retryDelaysMs.getOrElse(retryAttempt) { retryDelaysMs.last() }
|
val delayMs = if (immediate) 0L else retryDelaysMs.getOrElse(retryAttempt) { retryDelaysMs.last() }
|
||||||
retryAttempt++
|
retryAttempt++
|
||||||
Log.d(TAG, "Reconnect scheduled in ${delayMs}ms (attempt=$retryAttempt)")
|
Log.d(TAG, "Reconnect scheduled in ${delayMs}ms (attempt=$retryAttempt)")
|
||||||
@@ -224,6 +261,7 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
delay(delayMs)
|
delay(delayMs)
|
||||||
if (!player.playWhenReady) {
|
if (!player.playWhenReady) {
|
||||||
Log.d(TAG, "Reconnect skipped - no longer playWhenReady")
|
Log.d(TAG, "Reconnect skipped - no longer playWhenReady")
|
||||||
|
releaseReconnectLocks()
|
||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
restartStream()
|
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() {
|
private fun registerNetworkCallback() {
|
||||||
val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager ?: return
|
val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager ?: return
|
||||||
connectivityManager = cm
|
connectivityManager = cm
|
||||||
@@ -254,8 +320,15 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
// Called on a ConnectivityManager thread; ExoPlayer must only be accessed on the main thread.
|
// Called on a ConnectivityManager thread; ExoPlayer must only be accessed on the main thread.
|
||||||
override fun onAvailable(network: Network) {
|
override fun onAvailable(network: Network) {
|
||||||
serviceScope.launch {
|
serviceScope.launch {
|
||||||
if (retryJob?.isActive == true && player.playWhenReady && player.playbackState != Player.STATE_READY) {
|
val previous = defaultNetwork
|
||||||
Log.d(TAG, "Network available again - reconnecting immediately")
|
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)
|
scheduleReconnect(immediate = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -300,9 +373,7 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log.d(TAG, "Audio session id for effects: ${player.audioSessionId}")
|
Log.d(TAG, "Audio session id for effects: ${player.audioSessionId}")
|
||||||
audioEffectsEngine = AudioEffectsEngine(applicationContext, player.audioSessionId).also {
|
createAudioEffectsAsync(player.audioSessionId)
|
||||||
AudioEffectsController.attach(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
registerNetworkCallback()
|
registerNetworkCallback()
|
||||||
|
|
||||||
@@ -319,6 +390,26 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
.build()
|
.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 onGetSession(controllerInfo: MediaSession.ControllerInfo): MediaLibrarySession? = mediaLibrarySession
|
||||||
|
|
||||||
override fun onTaskRemoved(rootIntent: Intent?) {
|
override fun onTaskRemoved(rootIntent: Intent?) {
|
||||||
@@ -329,7 +420,9 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
destroyed = true
|
||||||
retryJob?.cancel()
|
retryJob?.cancel()
|
||||||
|
releaseReconnectLocks()
|
||||||
serviceScope.cancel()
|
serviceScope.cancel()
|
||||||
networkCallback?.let { cb ->
|
networkCallback?.let { cb ->
|
||||||
try { connectivityManager?.unregisterNetworkCallback(cb) } catch (_: Exception) {}
|
try { connectivityManager?.unregisterNetworkCallback(cb) } catch (_: Exception) {}
|
||||||
@@ -349,6 +442,8 @@ class FogwavePlaybackService : MediaLibraryService() {
|
|||||||
private const val ROOT_ID = "fogwave_root"
|
private const val ROOT_ID = "fogwave_root"
|
||||||
private const val TAG = "FogwavePlaybackService"
|
private const val TAG = "FogwavePlaybackService"
|
||||||
private const val MAX_RETRY_ATTEMPTS = 12
|
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
|
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.
|
// Declared after every property it touches so that nothing is read before initialization.
|
||||||
init {
|
init {
|
||||||
connectToPlaybackService()
|
connectToPlaybackService()
|
||||||
@@ -56,7 +67,9 @@ class RadioPlayerManager(private val context: Context) {
|
|||||||
private fun connectToPlaybackService() {
|
private fun connectToPlaybackService() {
|
||||||
if (released || controllerFuture != null) return
|
if (released || controllerFuture != null) return
|
||||||
val sessionToken = SessionToken(context, ComponentName(context, FogwavePlaybackService::class.java))
|
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
|
controllerFuture = future
|
||||||
future.addListener({
|
future.addListener({
|
||||||
if (released) return@addListener
|
if (released) return@addListener
|
||||||
@@ -83,6 +96,21 @@ class RadioPlayerManager(private val context: Context) {
|
|||||||
}, MoreExecutors.directExecutor())
|
}, 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 {
|
private fun deriveState(p: Player): PlayerState {
|
||||||
p.playerError?.let { return PlayerState.Error(errorMessage(it)) }
|
p.playerError?.let { return PlayerState.Error(errorMessage(it)) }
|
||||||
return when (p.playbackState) {
|
return when (p.playbackState) {
|
||||||
@@ -108,7 +136,7 @@ class RadioPlayerManager(private val context: Context) {
|
|||||||
fun playStation(station: RadioStation) {
|
fun playStation(station: RadioStation) {
|
||||||
Log.d(TAG, "Station requested: ${station.id}")
|
Log.d(TAG, "Station requested: ${station.id}")
|
||||||
currentStation = station
|
currentStation = station
|
||||||
val c = controller
|
val c = connectedController()
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
pendingStation = station
|
pendingStation = station
|
||||||
_playerState.value = PlayerState.Connecting
|
_playerState.value = PlayerState.Connecting
|
||||||
@@ -127,7 +155,7 @@ class RadioPlayerManager(private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun play() {
|
fun play() {
|
||||||
val c = controller
|
val c = connectedController()
|
||||||
when {
|
when {
|
||||||
c == null || c.mediaItemCount == 0 -> currentStation?.let { playStation(it) }
|
c == null || c.mediaItemCount == 0 -> currentStation?.let { playStation(it) }
|
||||||
// A failed, stopped or finished live stream has to be reopened rather than resumed.
|
// 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.core.net.toUri
|
||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.common.MediaMetadata
|
import androidx.media3.common.MediaMetadata
|
||||||
|
import androidx.media3.common.MimeTypes
|
||||||
import cc.skysparkle.fogwave.data.model.RadioStation
|
import cc.skysparkle.fogwave.data.model.RadioStation
|
||||||
|
|
||||||
fun RadioStation.toMediaItem(context: Context): MediaItem {
|
fun RadioStation.toMediaItem(context: Context): MediaItem {
|
||||||
val artworkUri = "${ContentResolver.SCHEME_ANDROID_RESOURCE}://${context.packageName}/$iconResId".toUri()
|
val artworkUri = "${ContentResolver.SCHEME_ANDROID_RESOURCE}://${context.packageName}/$iconResId".toUri()
|
||||||
return MediaItem.Builder()
|
return MediaItem.Builder()
|
||||||
.setUri(streamUrl)
|
.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)
|
.setMediaId(id)
|
||||||
.setMediaMetadata(
|
.setMediaMetadata(
|
||||||
MediaMetadata.Builder()
|
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 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 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 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("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("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),
|
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.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.heightIn
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.selection.selectable
|
import androidx.compose.foundation.selection.selectable
|
||||||
@@ -62,7 +63,8 @@ fun StationsToolbar(
|
|||||||
onSelectViewMode: (ViewMode) -> Unit,
|
onSelectViewMode: (ViewMode) -> Unit,
|
||||||
sizeStep: IconSizeStep,
|
sizeStep: IconSizeStep,
|
||||||
onSelectSizeStep: (IconSizeStep) -> Unit,
|
onSelectSizeStep: (IconSizeStep) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier,
|
||||||
|
showViewOptions: Boolean = true
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
@@ -70,7 +72,8 @@ fun StationsToolbar(
|
|||||||
.padding(horizontal = 20.dp, vertical = 6.dp)
|
.padding(horizontal = 20.dp, vertical = 6.dp)
|
||||||
) {
|
) {
|
||||||
Row(
|
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,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
@@ -89,27 +92,29 @@ fun StationsToolbar(
|
|||||||
.padding(end = 12.dp)
|
.padding(end = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
Box(
|
if (showViewOptions) {
|
||||||
modifier = Modifier
|
Box(
|
||||||
.size(38.dp)
|
modifier = Modifier
|
||||||
.clip(RoundedCornerShape(12.dp))
|
.size(38.dp)
|
||||||
.background(if (isOpen) LocalGeoColors.current.primaryContainer else LocalGeoColors.current.surfaceContainer)
|
.clip(RoundedCornerShape(12.dp))
|
||||||
.border(1.dp, LocalGeoColors.current.outlineVariant, RoundedCornerShape(12.dp))
|
.background(if (isOpen) LocalGeoColors.current.primaryContainer else LocalGeoColors.current.surfaceContainer)
|
||||||
.clickable(role = Role.Button) { onToggleOpen() }
|
.border(1.dp, LocalGeoColors.current.outlineVariant, RoundedCornerShape(12.dp))
|
||||||
.testTag("view_options_trigger"),
|
.clickable(role = Role.Button) { onToggleOpen() }
|
||||||
contentAlignment = Alignment.Center
|
.testTag("view_options_trigger"),
|
||||||
) {
|
contentAlignment = Alignment.Center
|
||||||
AppIcon(
|
) {
|
||||||
resId = R.drawable.ic_table,
|
AppIcon(
|
||||||
contentDescription = stringResource(R.string.view_mode_content_desc),
|
resId = R.drawable.ic_table,
|
||||||
tint = if (isOpen) LocalGeoColors.current.deepPurple else LocalGeoColors.current.onSurfaceVariant,
|
contentDescription = stringResource(R.string.view_mode_content_desc),
|
||||||
size = 19.dp
|
tint = if (isOpen) LocalGeoColors.current.deepPurple else LocalGeoColors.current.onSurfaceVariant,
|
||||||
)
|
size = 19.dp
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = isOpen,
|
visible = isOpen && showViewOptions,
|
||||||
enter = expandVertically(
|
enter = expandVertically(
|
||||||
animationSpec = spring(dampingRatio = 0.85f, stiffness = Spring.StiffnessMediumLow),
|
animationSpec = spring(dampingRatio = 0.85f, stiffness = Spring.StiffnessMediumLow),
|
||||||
expandFrom = Alignment.Top
|
expandFrom = Alignment.Top
|
||||||
|
|||||||
@@ -128,7 +128,9 @@ fun HomeScreen(
|
|||||||
viewMode = uiState.viewMode,
|
viewMode = uiState.viewMode,
|
||||||
onSelectViewMode = { viewModel.setViewMode(it) },
|
onSelectViewMode = { viewModel.setViewMode(it) },
|
||||||
sizeStep = uiState.sizeStep,
|
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)) {
|
Box(modifier = Modifier.weight(1f)) {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 922 B |
|
Before Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 918 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 430 B |
|
Before Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 756 B |
|
Before Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1002 B |
|
Before Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 930 B |
|
Before Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 644 B |
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">Musik & Hit-Klassiker</string>
|
<string name="station_desc_plus">Musik & Hit-Klassiker</string>
|
||||||
<string name="station_desc_goldfm">Goldene Hits</string>
|
<string name="station_desc_goldfm">Goldene Hits</string>
|
||||||
<string name="station_desc_rc">Radiocentras • Litauen</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 & Talk • Litauen</string>
|
||||||
|
<string name="station_desc_lr1">Öffentliche Nachrichten & Talk • Lettland</string>
|
||||||
|
<string name="station_desc_lr2">Lettische Musik • Lettland</string>
|
||||||
<string name="genre_hits">Hits</string>
|
<string name="genre_hits">Hits</string>
|
||||||
<string name="genre_pop">Pop</string>
|
<string name="genre_pop">Pop</string>
|
||||||
<string name="genre_dance">Dance</string>
|
<string name="genre_dance">Dance</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">Rock</string>
|
<string name="genre_rock">Rock</string>
|
||||||
<string name="genre_easy_listening">Easy Listening</string>
|
<string name="genre_easy_listening">Easy Listening</string>
|
||||||
<string name="genre_lithuanian">Litauische Musik</string>
|
<string name="genre_lithuanian">Litauische Musik</string>
|
||||||
|
<string name="genre_news_talk">Nachrichten & Talk</string>
|
||||||
|
<string name="genre_latvian">Lettische Musik</string>
|
||||||
|
|
||||||
<string name="eq_preset_normal">Normal</string>
|
<string name="eq_preset_normal">Normal</string>
|
||||||
<string name="eq_preset_classical">Klassik</string>
|
<string name="eq_preset_classical">Klassik</string>
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">音楽と往年のヒット曲</string>
|
<string name="station_desc_plus">音楽と往年のヒット曲</string>
|
||||||
<string name="station_desc_goldfm">ゴールデンヒット</string>
|
<string name="station_desc_goldfm">ゴールデンヒット</string>
|
||||||
<string name="station_desc_rc">Radiocentras • リトアニア</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_hits">ヒット曲</string>
|
||||||
<string name="genre_pop">ポップ</string>
|
<string name="genre_pop">ポップ</string>
|
||||||
<string name="genre_dance">ダンス</string>
|
<string name="genre_dance">ダンス</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">ロック</string>
|
<string name="genre_rock">ロック</string>
|
||||||
<string name="genre_easy_listening">イージーリスニング</string>
|
<string name="genre_easy_listening">イージーリスニング</string>
|
||||||
<string name="genre_lithuanian">リトアニア音楽</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_normal">ノーマル</string>
|
||||||
<string name="eq_preset_classical">クラシック</string>
|
<string name="eq_preset_classical">クラシック</string>
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">Muzika ir klasikiniai hitai</string>
|
<string name="station_desc_plus">Muzika ir klasikiniai hitai</string>
|
||||||
<string name="station_desc_goldfm">Auksiniai hitai</string>
|
<string name="station_desc_goldfm">Auksiniai hitai</string>
|
||||||
<string name="station_desc_rc">Radiocentras • Lietuva</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_hits">Hitai</string>
|
||||||
<string name="genre_pop">Pop</string>
|
<string name="genre_pop">Pop</string>
|
||||||
<string name="genre_dance">Šokių</string>
|
<string name="genre_dance">Šokių</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">Rokas</string>
|
<string name="genre_rock">Rokas</string>
|
||||||
<string name="genre_easy_listening">Lengvoji muzika</string>
|
<string name="genre_easy_listening">Lengvoji muzika</string>
|
||||||
<string name="genre_lithuanian">Lietuviška 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_normal">Įprastas</string>
|
||||||
<string name="eq_preset_classical">Klasika</string>
|
<string name="eq_preset_classical">Klasika</string>
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">Музыка и хиты прошлых лет</string>
|
<string name="station_desc_plus">Музыка и хиты прошлых лет</string>
|
||||||
<string name="station_desc_goldfm">Золотые хиты</string>
|
<string name="station_desc_goldfm">Золотые хиты</string>
|
||||||
<string name="station_desc_rc">Radiocentras • Литва</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_hits">Хиты</string>
|
||||||
<string name="genre_pop">Поп</string>
|
<string name="genre_pop">Поп</string>
|
||||||
<string name="genre_dance">Танцевальная</string>
|
<string name="genre_dance">Танцевальная</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">Рок</string>
|
<string name="genre_rock">Рок</string>
|
||||||
<string name="genre_easy_listening">Лёгкая музыка</string>
|
<string name="genre_easy_listening">Лёгкая музыка</string>
|
||||||
<string name="genre_lithuanian">Литовская музыка</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_normal">Обычный</string>
|
||||||
<string name="eq_preset_classical">Классика</string>
|
<string name="eq_preset_classical">Классика</string>
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">音乐与经典金曲</string>
|
<string name="station_desc_plus">音乐与经典金曲</string>
|
||||||
<string name="station_desc_goldfm">黄金金曲</string>
|
<string name="station_desc_goldfm">黄金金曲</string>
|
||||||
<string name="station_desc_rc">Radiocentras • 立陶宛</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_hits">热门</string>
|
||||||
<string name="genre_pop">流行</string>
|
<string name="genre_pop">流行</string>
|
||||||
<string name="genre_dance">舞曲</string>
|
<string name="genre_dance">舞曲</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">摇滚</string>
|
<string name="genre_rock">摇滚</string>
|
||||||
<string name="genre_easy_listening">轻音乐</string>
|
<string name="genre_easy_listening">轻音乐</string>
|
||||||
<string name="genre_lithuanian">立陶宛音乐</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_normal">正常</string>
|
||||||
<string name="eq_preset_classical">古典</string>
|
<string name="eq_preset_classical">古典</string>
|
||||||
|
|||||||
@@ -88,6 +88,10 @@
|
|||||||
<string name="station_desc_plus">Music & classic hits</string>
|
<string name="station_desc_plus">Music & classic hits</string>
|
||||||
<string name="station_desc_goldfm">Golden hits</string>
|
<string name="station_desc_goldfm">Golden hits</string>
|
||||||
<string name="station_desc_rc">Radiocentras • Lithuania</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 & talk • Lithuania</string>
|
||||||
|
<string name="station_desc_lr1">Public news & talk • Latvia</string>
|
||||||
|
<string name="station_desc_lr2">Latvian music • Latvia</string>
|
||||||
<string name="genre_hits">Hits</string>
|
<string name="genre_hits">Hits</string>
|
||||||
<string name="genre_pop">Pop</string>
|
<string name="genre_pop">Pop</string>
|
||||||
<string name="genre_dance">Dance</string>
|
<string name="genre_dance">Dance</string>
|
||||||
@@ -95,6 +99,8 @@
|
|||||||
<string name="genre_rock">Rock</string>
|
<string name="genre_rock">Rock</string>
|
||||||
<string name="genre_easy_listening">Easy listening</string>
|
<string name="genre_easy_listening">Easy listening</string>
|
||||||
<string name="genre_lithuanian">Lithuanian music</string>
|
<string name="genre_lithuanian">Lithuanian music</string>
|
||||||
|
<string name="genre_news_talk">News & talk</string>
|
||||||
|
<string name="genre_latvian">Latvian music</string>
|
||||||
|
|
||||||
<string name="eq_preset_normal">Normal</string>
|
<string name="eq_preset_normal">Normal</string>
|
||||||
<string name="eq_preset_classical">Classical</string>
|
<string name="eq_preset_classical">Classical</string>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 784 KiB |
|
After Width: | Height: | Size: 1020 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 989 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 658 KiB |
|
Before Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 202 KiB |