7 Commits
Author SHA1 Message Date
kalarina 46a3f94057 Escape ampersands in new station strings 2026-11-08 14:10:06 +02:00
kalarina cca6d5e19c Release 1.0.13
- Add LRT Radijas, Žinių radijas, Latvijas Radio 1 and Latvijas Radio 2
- Add HLS playback (media3-exoplayer-hls) for the Latvijas Radio streams
- Add "News & talk" and "Latvian music" genres
- Show the view options button on the Radio tab only; Favorites uses the same layout
- Update descriptions and changelogs

Inspired by https://github.com/JacobBico/fogwave-baltic
2026-11-08 13:50:10 +02:00
kalarina 5561754a71 Release 1.0.13 2026-11-07 16:29:40 +02:00
kalarina f84df8b21e Reconnect the media controller after it disconnects 2026-11-07 16:28:01 +02:00
kalarina 197ac2784c Make stream reconnects reliable and create audio effects off the main thread
- Hold a wake lock and Wi-Fi lock while a reconnect is pending so the backoff
  does not stall with the screen off
- Raise the rebuffer threshold to 2.5 s to stop play-stall stutter on weak networks
- Reconnect at once when the default network changes during a stall
- Give up quickly on errors that will not recover (4xx, unsupported format)
- Build audio effects on a background thread to keep startup smooth
2026-11-07 16:28:01 +02:00
kalarina 237be98cf0 Cache equalizer state instead of querying audioserver on every slider move 2026-11-07 16:28:01 +02:00
kalarina 91e5467d11 Add GitHub issue and pull request templates 2026-11-05 18:44:16 +02:00
40 changed files with 461 additions and 82 deletions
+27
View File
@@ -0,0 +1,27 @@
---
name: Bug report
about: Something doesn't work as expected
title: "[Bug] "
---
**What happened**
**Steps to reproduce**
1.
2.
3.
**What you expected**
**Environment**
- App version:
- Installed from: Gitea / GitHub / F-Droid / Google Play
- Device and Android version:
- Station (if related):
**Screenshots or logs** (optional)
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Main repository on git.skysparkle.cc
url: https://git.skysparkle.cc/kalarina/Fogwave
about: This GitHub repository is a mirror. Issues are welcome here and on Gitea.
+18
View File
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea that fits the app
title: "[Feature] "
---
<!-- Please check the "Out of scope" list in CONTRIBUTING.md before opening this. -->
**What problem does this solve**
**Proposed solution**
**Alternatives you considered**
- [ ] I'd like to implement this myself
+15
View File
@@ -0,0 +1,15 @@
---
name: Station request
about: Suggest a Lithuanian radio station
title: "[Station] "
---
<!-- Only Lithuanian stations with an official public stream are accepted. -->
- Station name:
- Official website:
- Stream URL:
- Genre:
- [ ] The station is Lithuanian
- [ ] The stream is official and public
+12
View File
@@ -0,0 +1,12 @@
---
name: Translation fix
about: Report a wrong or awkward translation
title: "[Translation] "
---
<!-- Supported languages: English, Russian, German, Japanese, Lithuanian, Chinese. New languages are not accepted. -->
- Language:
- Screen or place in the app:
- Current text:
- Suggested text:
+16
View File
@@ -0,0 +1,16 @@
## What does this change
## Related issue
Closes #
## Checklist
- [ ] Discussed in an issue first (not needed for small fixes)
- [ ] `./gradlew assembleDebug` builds
- [ ] Tested on a device or emulator (Android version: )
- [ ] No ads, analytics, trackers or Google Play Services / Firebase dependencies
- [ ] New strings added to `values/strings.xml` (missing translations noted below)
- [ ] Screenshots added for UI changes
- [ ] I agree that my contribution is licensed under GPL-3.0-only
+1 -1
View File
@@ -31,7 +31,7 @@
## ✨ 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
+3 -2
View File
@@ -13,8 +13,8 @@ android {
applicationId = "cc.skysparkle.fogwave" applicationId = "cc.skysparkle.fogwave"
minSdk = 24 minSdk = 24
targetSdk = 36 targetSdk = 36
versionCode = 12 versionCode = 13
versionName = "1.0.12" 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) {
try {
val eq = equalizer ?: return val eq = equalizer ?: return
try {
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,6 +92,7 @@ fun StationsToolbar(
.padding(end = 12.dp) .padding(end = 12.dp)
) )
if (showViewOptions) {
Box( Box(
modifier = Modifier modifier = Modifier
.size(38.dp) .size(38.dp)
@@ -107,9 +111,10 @@ fun StationsToolbar(
) )
} }
} }
}
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)) {
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Musik &amp; Hit-Klassiker</string> <string name="station_desc_plus">Musik &amp; 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 &amp; Talk • Litauen</string>
<string name="station_desc_lr1">Öffentliche Nachrichten &amp; Talk • Lettland</string>
<string name="station_desc_lr2">Lettische Musik • Lettland</string>
<string name="genre_hits">Hits</string> <string name="genre_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 &amp; 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>
+6
View File
@@ -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>
+6
View File
@@ -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>
+6
View File
@@ -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>
+6
View File
@@ -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>
+6
View File
@@ -88,6 +88,10 @@
<string name="station_desc_plus">Music &amp; classic hits</string> <string name="station_desc_plus">Music &amp; 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 &amp; talk • Lithuania</string>
<string name="station_desc_lr1">Public news &amp; talk • Latvia</string>
<string name="station_desc_lr2">Latvian music • Latvia</string>
<string name="genre_hits">Hits</string> <string name="genre_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 &amp; 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>
@@ -0,0 +1,8 @@
• 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 Sender: LRT Radijas, Žinių radijas, Latvijas Radio 1 und 2
• Ansichtsoptionen nur noch im Tab „Radio“
Neue Versionen gibt es auch auf Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<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> <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>
<ul> <ul>
<li>Höre 10 litauische Sender, darunter ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1 und Gold FM.</li> <li>Höre 14 Sender aus Litauen und Lettland, darunter ZIP FM, Power Hit Radio, Rock FM, LRT Radijas, Žinių radijas und Latvijas Radio.</li>
<li>Hör weiter, während du andere Apps nutzt – mit Steuerung über Sperrbildschirm, Benachrichtigungen, Kopfhörer und Bluetooth.</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>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>Hör einfach weiter: Bricht der Stream oder das Netz ab, verbindet sich die App automatisch neu.</li>
@@ -0,0 +1,8 @@
• 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 stations: LRT Radijas, Žinių radijas, Latvijas Radio 1 and 2
• View options are now on the Radio tab only
New versions are also available on Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<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> <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>
<ul> <ul>
<li>Tune in to 10 Lithuanian stations, including ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1, and Gold FM.</li> <li>Tune in to 14 stations from Lithuania and Latvia, including ZIP FM, Power Hit Radio, Rock FM, LRT Radijas, Žinių radijas, and Latvijas Radio.</li>
<li>Keep listening while you use other apps, with controls on your lock screen, notifications, headphones, and Bluetooth.</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>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>Get back to listening easily with auto-reconnect when your stream or network drops.</li>
@@ -0,0 +1,8 @@
• 画面オフ時や Wi-Fi とモバイルデータの切り替え時も確実に再接続
• 電波の弱い場所での途切れを軽減
• イコライザーのスライダーがなめらかになり、起動も高速化
• 再生できないストリームを何分も再試行しなくなりました
• 新しい局: LRT Radijas、Žinių radijas、Latvijas Radio 1・2
• 表示オプションは「ラジオ」タブのみに
新しいバージョンは Gitea でも入手できます: https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<p>リトアニアで人気のラジオ局を、すっきりといつでも。Fogwaveなら簡単に選局でき、バックグラウンドで聴けて、広告なしの快適な体験を楽しめます。アカウント登録もトラッキングもありません。</p> <p>リトアニアで人気のラジオ局を、すっきりといつでも。Fogwaveなら簡単に選局でき、バックグラウンドで聴けて、広告なしの快適な体験を楽しめます。アカウント登録もトラッキングもありません。</p>
<ul> <ul>
<li>ZIP FM、Power Hit Radio、Rock FM、Relax FM、M-1、Gold FMなど、リトアニアの10局を収録。</li> <li>ZIP FM、Power Hit Radio、Rock FM、LRT Radijas、Žinių radijas、Latvijas Radioなど、リトアニアとラトビアの14局を収録。</li>
<li>他のアプリを使いながら聴き続けられます。ロック画面、通知、ヘッドホン、Bluetoothから操作可能。</li> <li>他のアプリを使いながら聴き続けられます。ロック画面、通知、ヘッドホン、Bluetoothから操作可能。</li>
<li>イコライザー、設定の保存、ラウドネスブースト、オーディオプリセットで好みの音に。</li> <li>イコライザー、設定の保存、ラウドネスブースト、オーディオプリセットで好みの音に。</li>
<li>ストリームやネットワークが途切れても自動で再接続し、すぐに再生が戻ります。</li> <li>ストリームやネットワークが途切れても自動で再接続し、すぐに再生が戻ります。</li>
@@ -0,0 +1,8 @@
• Patikimas prisijungimas iš naujo išjungus ekraną ir perjungiant Wi-Fi bei mobiliuosius duomenis
• Mažiau trūkčiojimų esant silpnam ryšiui
• Sklandesni ekvalaizerio slankikliai ir greitesnis paleidimas
• Nepasiekiami srautai nebebandomi prijungti kelias minutes
• Naujos stotys: LRT Radijas, Žinių radijas, Latvijas Radio 1 ir 2
• Rodinio nustatymai liko tik skiltyje „Radijas“
Naujos versijos taip pat pasiekiamos Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<p>Mėgstamiausios Lietuvos radijo stotys visada su jumis – be nereikalingų dalykų. Su Fogwave lengva įsijungti radiją, klausytis fone ir mėgautis švariu klausymu be reklamų, be paskyros ir be sekimo.</p> <p>Mėgstamiausios Lietuvos radijo stotys visada su jumis – be nereikalingų dalykų. Su Fogwave lengva įsijungti radiją, klausytis fone ir mėgautis švariu klausymu be reklamų, be paskyros ir be sekimo.</p>
<ul> <ul>
<li>Klausykitės 10 Lietuvos stočių, tarp jų ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1 ir Gold FM.</li> <li>Klausykitės 14 Lietuvos ir Latvijos stočių, tarp jų ZIP FM, Power Hit Radio, Rock FM, LRT Radijas, Žinių radijas ir Latvijas Radio.</li>
<li>Klausykitės toliau naudodamiesi kitomis programėlėmis – valdykite atkūrimą iš užrakinimo ekrano, pranešimų, ausinių ir per Bluetooth.</li> <li>Klausykitės toliau naudodamiesi kitomis programėlėmis – valdykite atkūrimą iš užrakinimo ekrano, pranešimų, ausinių ir per Bluetooth.</li>
<li>Mėgaukitės mėgstamu skambėjimu su ekvalaizeriu, išsaugomais nustatymais, garsumo stiprinimu ir garso šablonais.</li> <li>Mėgaukitės mėgstamu skambėjimu su ekvalaizeriu, išsaugomais nustatymais, garsumo stiprinimu ir garso šablonais.</li>
<li>Lengvai grįžkite prie klausymo – nutrūkus srautui ar ryšiui programėlė automatiškai prisijungia iš naujo.</li> <li>Lengvai grįžkite prie klausymo – nutrūkus srautui ar ryšiui programėlė automatiškai prisijungia iš naujo.</li>
@@ -0,0 +1,8 @@
• Надёжное переподключение при выключенном экране и при переходе между Wi-Fi и мобильной сетью
• Меньше заиканий на слабой сети
• Плавные слайдеры эквалайзера и более быстрый запуск
• Недоступные потоки больше не переподключаются по несколько минут
• Новые станции: LRT Radijas, Žinių radijas, Latvijas Radio 1 и 2
• Настройки вида остались только на вкладке «Радио»
Новые версии также доступны в Gitea: https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<p>Любимые радиостанции Литвы всегда с вами — без лишнего. Fogwave позволяет легко включить радио, слушать его в фоне и наслаждаться чистым прослушиванием без рекламы, аккаунта и отслеживания.</p> <p>Любимые радиостанции Литвы всегда с вами — без лишнего. Fogwave позволяет легко включить радио, слушать его в фоне и наслаждаться чистым прослушиванием без рекламы, аккаунта и отслеживания.</p>
<ul> <ul>
<li>Слушайте 10 литовских станций, включая ZIP FM, Power Hit Radio, Rock FM, Relax FM, M-1 и Gold FM.</li> <li>Слушайте 14 станций Литвы и Латвии, включая ZIP FM, Power Hit Radio, Rock FM, LRT Radijas, Žinių radijas и Latvijas Radio.</li>
<li>Продолжайте слушать в других приложениях, управляя воспроизведением с экрана блокировки, из уведомлений, наушников и по Bluetooth.</li> <li>Продолжайте слушать в других приложениях, управляя воспроизведением с экрана блокировки, из уведомлений, наушников и по Bluetooth.</li>
<li>Настройте звук под себя: эквалайзер, сохранённые настройки, усиление громкости и аудиопресеты.</li> <li>Настройте звук под себя: эквалайзер, сохранённые настройки, усиление громкости и аудиопресеты.</li>
<li>Легко возвращайтесь к прослушиванию: приложение само переподключится, если поток или сеть пропадут.</li> <li>Легко возвращайтесь к прослушиванию: приложение само переподключится, если поток или сеть пропадут.</li>
@@ -0,0 +1,8 @@
• 息屏时以及在 Wi-Fi 与移动数据之间切换后能可靠地重新连接
• 网络较弱时卡顿更少
• 均衡器滑块更流畅,应用启动更快
• 无法播放的音频流不再反复重试数分钟
• 新增电台:LRT Radijas、Žinių radijas、Latvijas Radio 1 和 2
• 视图选项现仅在“电台”标签页中
新版本也可在 Gitea 获取:https://git.skysparkle.cc/kalarina/Fogwave/releases
@@ -1,7 +1,7 @@
<p>随身携带立陶宛最受欢迎的电台,简洁不杂乱。Fogwave 让你轻松收听、后台播放,享受干净无广告的体验,无需账号,也没有任何跟踪。</p> <p>随身携带立陶宛最受欢迎的电台,简洁不杂乱。Fogwave 让你轻松收听、后台播放,享受干净无广告的体验,无需账号,也没有任何跟踪。</p>
<ul> <ul>
<li>收听 10 个立陶宛电台,包括 ZIP FM、Power Hit Radio、Rock FM、Relax FM、M-1 和 Gold FM。</li> <li>收听 14 个立陶宛和拉脱维亚电台,包括 ZIP FM、Power Hit Radio、Rock FM、LRT Radijas、Žinių radijas 和 Latvijas Radio。</li>
<li>使用其他应用时也能继续收听,可通过锁屏、通知、耳机和蓝牙控制播放。</li> <li>使用其他应用时也能继续收听,可通过锁屏、通知、耳机和蓝牙控制播放。</li>
<li>用均衡器、已保存的设置、响度增强和音频预设,调出你喜欢的声音。</li> <li>用均衡器、已保存的设置、响度增强和音频预设,调出你喜欢的声音。</li>
<li>音频流或网络中断时自动重新连接,轻松恢复收听。</li> <li>音频流或网络中断时自动重新连接,轻松恢复收听。</li>
+1
View File
@@ -37,6 +37,7 @@ androidx-runner = { group = "androidx.test", name = "runner", version.ref = "run
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilCompose" } coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilCompose" }
androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" } androidx-media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" }
androidx-media3-exoplayer-hls = { group = "androidx.media3", name = "media3-exoplayer-hls", version.ref = "media3" }
androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" } androidx-media3-common = { group = "androidx.media3", name = "media3-common", version.ref = "media3" }
androidx-media3-session = { group = "androidx.media3", name = "media3-session", version.ref = "media3" } androidx-media3-session = { group = "androidx.media3", name = "media3-session", version.ref = "media3" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" } kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }