Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
||||
*.bat text eol=crlf
|
||||
*.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
|
||||
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
|
||||
|
||||
@@ -1,99 +1,89 @@
|
||||
<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>
|
||||
|
||||
<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://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>
|
||||
|
||||
**A calm, open-source internet radio app for Android.**
|
||||
<p align="center">
|
||||
<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>
|
||||
|
||||
Listen to Lithuania's favorite stations in one tap — with background playback, a built-in equalizer, and a clean, distraction-free design.
|
||||
<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>
|
||||
|
||||
## Features
|
||||
> [!TIP]
|
||||
> If you find Fogwave useful, please consider giving it a ⭐ — it helps others discover the project.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 📻 **10 Lithuanian stations** — ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1, Gold FM 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).
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
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 |
|
Before Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 644 B |
|
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 |
@@ -0,0 +1 @@
|
||||
• Oberflächensymbole jetzt im WebP-Format: kleinere App, gleiches Aussehen
|
||||
@@ -0,0 +1,6 @@
|
||||
• Zuverlässige Neuverbindung bei ausgeschaltetem Bildschirm und beim Wechsel zwischen WLAN und Mobilfunk
|
||||
• Weniger Aussetzer bei schwachem Netz
|
||||
• Flüssigere Equalizer-Regler und schnellerer App-Start
|
||||
• Nicht erreichbare Streams werden nicht mehr minutenlang neu versucht
|
||||
|
||||
Neue Versionen gibt es auch auf Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
|
||||
@@ -1,20 +1,16 @@
|
||||
Fogwave ist ein schlichter, werbefreier Internetradio-Player für litauische Sender.
|
||||
<p>Nimm Litauens beliebteste Radiosender mit – ganz ohne Ballast. Mit Fogwave schaltest du einfach ein, hörst im Hintergrund und genießt ein aufgeräumtes, werbefreies Erlebnis ohne Konto und ohne Tracking.</p>
|
||||
|
||||
<b>Sender</b>
|
||||
ZIP FM, Power Hit Radio, Power Hit Radio Gold, Rock FM, Relax FM, Lietus, M-1, M-1 Plius, Gold FM und RC.
|
||||
|
||||
<b>Funktionen</b>
|
||||
<ul>
|
||||
<li>Wiedergabe im Hintergrund mit Steuerung über Benachrichtigung, Sperrbildschirm, Headset und Bluetooth</li>
|
||||
<li>Unterstützung für Android Auto</li>
|
||||
<li>Automatische Neuverbindung, wenn der Stream abbricht oder das Netz zurückkommt</li>
|
||||
<li>Equalizer mit Voreinstellungen und Bandregelung, Lautheitsverstärker und Dynamikbearbeitung</li>
|
||||
<li>Favoriten, zuletzt gehörte und ähnliche Sender</li>
|
||||
<li>Vier Ansichten – Liste, Tabelle, Kacheln und Symbole – mit einstellbarer Größe</li>
|
||||
<li>Englisch, Russisch, Deutsch, Litauisch, Japanisch und Chinesisch</li>
|
||||
<li>Höre 10 litauische Sender, darunter ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1 und Gold FM.</li>
|
||||
<li>Hör weiter, während du andere Apps nutzt – mit Steuerung über Sperrbildschirm, Benachrichtigungen, Kopfhörer und Bluetooth.</li>
|
||||
<li>Genieße deinen Lieblingsklang mit Equalizer, gespeicherten Einstellungen, Lautstärkeverstärkung und Audio-Presets.</li>
|
||||
<li>Hör einfach weiter: Bricht der Stream oder das Netz ab, verbindet sich die App automatisch neu.</li>
|
||||
<li>Nimm das Radio mit auf die Straße – mit Android-Auto-Unterstützung.</li>
|
||||
<li>Finde Sender auf deine Art: Favoriten, zuletzt gehörte Sender, passende Genres und vier Ansichten.</li>
|
||||
</ul>
|
||||
|
||||
<b>Datenschutz</b>
|
||||
Keine Konten, keine Werbung, keine Analyse. Der Ton kommt direkt von den Servern der Sender; Fogwave speichert oder verbreitet ihn nicht.
|
||||
<p>Wähle einen Sender und tippe auf Wiedergabe. Fogwave spielt im Hintergrund weiter und speichert deine Equalizer-Einstellungen für das nächste Mal. Das dunkle, aufgeräumte Design gibt es auf Englisch, Russisch, Deutsch, Japanisch, Litauisch und Chinesisch.</p>
|
||||
|
||||
Sendernamen und Logos gehören ihren jeweiligen Inhabern.
|
||||
<p>Ob du in Litauen lebst, zu Besuch bist oder einfach litauische Musik und Radio magst – mit Fogwave hörst du ganz unkompliziert zu. Open Source, ohne Werbung, Tracking oder Konto.</p>
|
||||
|
||||
<p>Lade Fogwave herunter und schalte Litauen ein.</p>
|
||||
|
||||
@@ -1 +1 @@
|
||||
Schlichtes, werbefreies Internetradio mit litauischen Sendern
|
||||
Litauisches Radio mit einem Tippen – entspannt und werbefrei hören.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
• Interface icons are now WebP: the app is smaller and looks the same
|
||||
@@ -0,0 +1,6 @@
|
||||
• Playback reconnects reliably with the screen off and after switching between Wi-Fi and mobile data
|
||||
• Less stuttering on a weak network
|
||||
• Smoother equalizer sliders and faster app start
|
||||
• Hopeless streams are no longer retried for minutes
|
||||
|
||||
New versions are also available on Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
|
||||
@@ -1,20 +1,16 @@
|
||||
Fogwave is a minimal, ad-free internet radio player for Lithuanian stations.
|
||||
<p>Bring Lithuania's favorite radio stations along, without the clutter. Fogwave makes it easy to tune in, listen in the background, and enjoy a clean, ad-free experience with no account or tracking required.</p>
|
||||
|
||||
<b>Stations</b>
|
||||
ZIP FM, Power Hit Radio, Power Hit Radio Gold, Rock FM, Relax FM, Lietus, M-1, M-1 Plius, Gold FM and RC.
|
||||
|
||||
<b>Features</b>
|
||||
<ul>
|
||||
<li>Background playback with notification, lock-screen, headset and Bluetooth controls</li>
|
||||
<li>Android Auto support</li>
|
||||
<li>Automatic reconnection when the stream drops or the network comes back</li>
|
||||
<li>Equalizer with presets and per-band control, loudness enhancer and dynamics processing</li>
|
||||
<li>Favorites, recently played and similar stations</li>
|
||||
<li>Four layouts — list, table, tiles and icons — with adjustable size</li>
|
||||
<li>English, Russian, German, Lithuanian, Japanese and Chinese</li>
|
||||
<li>Tune in to 10 Lithuanian stations, including ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1, and Gold FM.</li>
|
||||
<li>Keep listening while you use other apps, with controls on your lock screen, notifications, headphones, and Bluetooth.</li>
|
||||
<li>Enjoy your favorite sound with an equalizer, saved settings, loudness boost, and audio presets.</li>
|
||||
<li>Get back to listening easily with auto-reconnect when your stream or network drops.</li>
|
||||
<li>Take radio on the road with Android Auto support.</li>
|
||||
<li>Find stations your way with favorites, recently played stations, genre matches, and four viewing layouts.</li>
|
||||
</ul>
|
||||
|
||||
<b>Privacy</b>
|
||||
No accounts, no ads, no analytics. Audio is streamed directly from each broadcaster; Fogwave does not host or redistribute it.
|
||||
<p>Choose a station and press play. Fogwave keeps audio running in the background and saves your equalizer settings for your next session. Its dark, uncluttered design is available in English, Russian, German, Japanese, Lithuanian, and Chinese.</p>
|
||||
|
||||
Station names and logos belong to their respective owners.
|
||||
<p>Whether you live in Lithuania, are visiting, or simply enjoy Lithuanian music and radio, Fogwave gives you a straightforward way to listen. It's open source, with no ads, tracking, or account required.</p>
|
||||
|
||||
<p>Download Fogwave and tune in to Lithuania.</p>
|
||||
|
||||
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 784 KiB |
|
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 1020 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 989 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 658 KiB |
|
Before Width: | Height: | Size: 200 KiB |
@@ -1 +1 @@
|
||||
Minimal ad-free internet radio for Lithuanian stations
|
||||
Enjoy Lithuanian radio in one tap, with a calm, ad-free listening experience.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
• UIアイコンをWebP形式に変更:アプリが軽くなり、見た目は同じです
|
||||
@@ -0,0 +1,6 @@
|
||||
• 画面オフ時や Wi-Fi とモバイルデータの切り替え時も確実に再接続
|
||||
• 電波の弱い場所での途切れを軽減
|
||||
• イコライザーのスライダーがなめらかになり、起動も高速化
|
||||
• 再生できないストリームを何分も再試行しなくなりました
|
||||
|
||||
新しいバージョンは Gitea でも入手できます: https://git.skysparkle.cc/kalarina/Fogwave/releases
|
||||
@@ -1,20 +1,16 @@
|
||||
Fogwave は、リトアニアのラジオ局を聴くための広告なしのシンプルなインターネットラジオプレーヤーです。
|
||||
<p>リトアニアで人気のラジオ局を、すっきりといつでも。Fogwaveなら簡単に選局でき、バックグラウンドで聴けて、広告なしの快適な体験を楽しめます。アカウント登録もトラッキングもありません。</p>
|
||||
|
||||
<b>放送局</b>
|
||||
ZIP FM、Power Hit Radio、Power Hit Radio Gold、Rock FM、Relax FM、Lietus、M-1、M-1 Plius、Gold FM、RC。
|
||||
|
||||
<b>機能</b>
|
||||
<ul>
|
||||
<li>通知、ロック画面、ヘッドセット、Bluetooth から操作できるバックグラウンド再生</li>
|
||||
<li>Android Auto に対応</li>
|
||||
<li>ストリームが途切れたときやネットワーク復帰時に自動で再接続</li>
|
||||
<li>プリセットと帯域ごとの調整ができるイコライザー、ラウドネスエンハンサー、ダイナミクス処理</li>
|
||||
<li>お気に入り、最近の再生、類似の放送局</li>
|
||||
<li>リスト・テーブル・タイル・アイコンの 4 つの表示とサイズ調整</li>
|
||||
<li>英語、ロシア語、ドイツ語、リトアニア語、日本語、中国語に対応</li>
|
||||
<li>ZIP FM、Power Hit Radio、Rock FM、Relax FM、M-1、Gold FMなど、リトアニアの10局を収録。</li>
|
||||
<li>他のアプリを使いながら聴き続けられます。ロック画面、通知、ヘッドホン、Bluetoothから操作可能。</li>
|
||||
<li>イコライザー、設定の保存、ラウドネスブースト、オーディオプリセットで好みの音に。</li>
|
||||
<li>ストリームやネットワークが途切れても自動で再接続し、すぐに再生が戻ります。</li>
|
||||
<li>Android Autoに対応し、ドライブ中もラジオを。</li>
|
||||
<li>お気に入り、最近聴いた局、ジャンルの一致、4種類の表示レイアウトで、自分好みに局を探せます。</li>
|
||||
</ul>
|
||||
|
||||
<b>プライバシー</b>
|
||||
アカウント、広告、解析は一切ありません。音声は各放送局から直接配信され、Fogwave が保存・再配布することはありません。
|
||||
<p>局を選んで再生するだけ。Fogwaveはバックグラウンドで再生を続け、イコライザー設定を次回まで保存します。ダークで余計なもののないデザインは、英語、ロシア語、ドイツ語、日本語、リトアニア語、中国語に対応しています。</p>
|
||||
|
||||
放送局の名称とロゴは各権利者に帰属します。
|
||||
<p>リトアニアに住んでいる方も、訪れている方も、リトアニアの音楽やラジオが好きな方も、Fogwaveで手軽に聴けます。オープンソースで、広告・トラッキング・アカウントは一切不要です。</p>
|
||||
|
||||
<p>Fogwaveをダウンロードして、リトアニアのラジオを聴きましょう。</p>
|
||||
|
||||