Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fea72b40d |
@@ -1,128 +0,0 @@
|
|||||||
name: Build & Deploy Pluriwave
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
PATH: /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
|
||||||
ANDROID_HOME: /Users/freetlab/Library/Android/sdk
|
|
||||||
KEYSTORE_PATH: /Users/freetlab/.openclaw/workspace/.secure/pluriwave/pluriwave-upload.jks
|
|
||||||
KEYSTORE_ALIAS: pluriwave-upload
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analizar:
|
|
||||||
name: Análisis de código
|
|
||||||
runs-on: [self-hosted, macos, arm64, flutter]
|
|
||||||
steps:
|
|
||||||
- name: Clonar repo
|
|
||||||
run: |
|
|
||||||
git clone https://ShanaiaBot:${{ secrets.GITEA_TOKEN }}@git.freetimelab.es/FreeTLab/pluriwave.git .
|
|
||||||
git fetch origin main
|
|
||||||
|
|
||||||
- name: Obtener dependencias
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Analizar código
|
|
||||||
run: flutter analyze --no-fatal-infos --no-fatal-warnings
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build APK + AAB release
|
|
||||||
runs-on: [self-hosted, macos, arm64, flutter]
|
|
||||||
needs: analizar
|
|
||||||
if: ${{ gitea.ref == 'refs/heads/main' }}
|
|
||||||
steps:
|
|
||||||
- name: Clonar repo
|
|
||||||
run: |
|
|
||||||
git clone https://ShanaiaBot:${{ secrets.GITEA_TOKEN }}@git.freetimelab.es/FreeTLab/pluriwave.git .
|
|
||||||
git fetch origin main
|
|
||||||
|
|
||||||
- name: Configurar keystore de firma
|
|
||||||
env:
|
|
||||||
KEYSTORE_PASSWORD: ${{ secrets.PLURIWAVE_KEYSTORE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
if [ ! -f "$KEYSTORE_PATH" ]; then
|
|
||||||
echo "ERROR: Keystore no encontrado en $KEYSTORE_PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "storeFile=$KEYSTORE_PATH" > android/key.properties
|
|
||||||
echo "storePassword=$KEYSTORE_PASSWORD" >> android/key.properties
|
|
||||||
echo "keyAlias=$KEYSTORE_ALIAS" >> android/key.properties
|
|
||||||
echo "keyPassword=$KEYSTORE_PASSWORD" >> android/key.properties
|
|
||||||
echo "✅ Keystore configurado"
|
|
||||||
|
|
||||||
- name: Bump versión patch + commit
|
|
||||||
run: |
|
|
||||||
git config user.name "ShanaiaBot"
|
|
||||||
git config user.email "shanaia@freetimelab.es"
|
|
||||||
CURRENT=$(grep '^version:' pubspec.yaml | awk '{print $2}')
|
|
||||||
SEMVER=$(echo $CURRENT | cut -d'+' -f1)
|
|
||||||
BUILD=$(echo $CURRENT | cut -d'+' -f2)
|
|
||||||
MAJOR=$(echo $SEMVER | cut -d. -f1)
|
|
||||||
MINOR=$(echo $SEMVER | cut -d. -f2)
|
|
||||||
PATCH=$(echo $SEMVER | cut -d. -f3)
|
|
||||||
NEW_PATCH=$((PATCH + 1))
|
|
||||||
NEW_BUILD=$((BUILD + 1))
|
|
||||||
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}+${NEW_BUILD}"
|
|
||||||
sed -i '' "s/^version: .*/version: ${NEW_VERSION}/" pubspec.yaml
|
|
||||||
git add pubspec.yaml
|
|
||||||
git commit -m "chore: bump version to ${NEW_VERSION} [ci skip]"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
- name: Extraer versión
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}' | cut -d'+' -f1)
|
|
||||||
COMMIT=$(git rev-parse --short HEAD)
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
echo "commit=$COMMIT" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Obtener dependencias
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Build APK release
|
|
||||||
run: flutter build apk --release
|
|
||||||
|
|
||||||
- name: Build AAB release
|
|
||||||
run: flutter build appbundle --release
|
|
||||||
|
|
||||||
- name: Verificar firma del AAB
|
|
||||||
run: |
|
|
||||||
echo "=== Huellas del keystore ==="
|
|
||||||
keytool -list -v -keystore "$KEYSTORE_PATH" -alias $KEYSTORE_ALIAS -storepass "$KEYSTORE_PASSWORD" 2>/dev/null | grep "SHA1:\|SHA256:"
|
|
||||||
echo ""
|
|
||||||
echo "=== Huellas del AAB (desde ZIP) ==="
|
|
||||||
unzip -p build/app/outputs/bundle/release/app-release.aab META-INF/CERT.RSA | keytool -printcert 2>/dev/null | grep "SHA1:\|SHA256:" || echo "(verificado tras build)"
|
|
||||||
|
|
||||||
- name: Publicar en ftl-builds (Zimaboard)
|
|
||||||
run: |
|
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
|
||||||
APK_NOMBRE="pluriwave-v${VERSION}.apk"
|
|
||||||
AAB_NOMBRE="pluriwave-v${VERSION}.aab"
|
|
||||||
DESTINO="/opt/ftl-builds/builds/pluriwave/v${VERSION}"
|
|
||||||
SSH_KEY="/Users/freetlab/.openclaw/workspace/.secure/zimaboard_ed25519"
|
|
||||||
|
|
||||||
ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no ShanaiaBot@192.168.0.33 "mkdir -p ${DESTINO}"
|
|
||||||
scp -i "$SSH_KEY" -o StrictHostKeyChecking=no \
|
|
||||||
build/app/outputs/flutter-apk/app-release.apk \
|
|
||||||
"ShanaiaBot@192.168.0.33:${DESTINO}/${APK_NOMBRE}"
|
|
||||||
scp -i "$SSH_KEY" -o StrictHostKeyChecking=no \
|
|
||||||
build/app/outputs/bundle/release/app-release.aab \
|
|
||||||
"ShanaiaBot@192.168.0.33:${DESTINO}/${AAB_NOMBRE}"
|
|
||||||
echo "✅ APK: builds.freetimelab.es → pluriwave → v${VERSION}"
|
|
||||||
echo "✅ AAB: builds.freetimelab.es → pluriwave → v${VERSION}"
|
|
||||||
|
|
||||||
- name: Notificar Telegram
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
|
||||||
COMMIT="${{ steps.version.outputs.commit }}"
|
|
||||||
BOT_TOKEN=$(plutil -extract 'EnvironmentVariables:TELEGRAM_BOT_TOKEN' raw /Users/freetlab/Library/LaunchAgents/ai.openclaw.gateway.plist 2>/dev/null || echo "")
|
|
||||||
if [ -z "$BOT_TOKEN" ]; then exit 0; fi
|
|
||||||
if [ "${{ job.status }}" = "success" ]; then
|
|
||||||
MSG="✅ *Pluriwave* v${VERSION} build OK (firma release) · ${COMMIT}%0AAPK + AAB en builds.freetimelab.es"
|
|
||||||
else
|
|
||||||
MSG="❌ *Pluriwave* v${VERSION} build FAILED · ${COMMIT}"
|
|
||||||
fi
|
|
||||||
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
|
|
||||||
-d "chat_id=221721467" -d "parse_mode=Markdown" -d "text=${MSG}" || true
|
|
||||||
@@ -11,8 +11,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
flutter-ci:
|
flutter-ci:
|
||||||
name: Test + Build
|
name: Test + Build
|
||||||
#runs-on: macos-14
|
runs-on: macos-14
|
||||||
runs-on: [self-hosted, macos, arm64, flutter]
|
|
||||||
env:
|
env:
|
||||||
ANDROID_HOME: /Users/freetlab/Library/Android/sdk
|
ANDROID_HOME: /Users/freetlab/Library/Android/sdk
|
||||||
|
|
||||||
@@ -32,7 +32,6 @@ migrate_working_dir/
|
|||||||
.pub/
|
.pub/
|
||||||
/build/
|
/build/
|
||||||
/coverage/
|
/coverage/
|
||||||
.atl/
|
|
||||||
|
|
||||||
# Symbolication related
|
# Symbolication related
|
||||||
app.*.symbols
|
app.*.symbols
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
# TODO
|
|
||||||
|
|
||||||
## Internacionalización AAA
|
|
||||||
|
|
||||||
- [x] Diseñar una base de internacionalización profesional con ficheros ARB separados por idioma.
|
|
||||||
- [x] Permitir que el usuario cambie el idioma manualmente desde la aplicación, sin depender únicamente del idioma del sistema.
|
|
||||||
- [x] Añadir traducción inicial español/inglés para el shell, navegación, timer de sueño y selector de idioma.
|
|
||||||
- [x] Añadir soporte inicial para un conjunto amplio de idiomas muy hablados: inglés, español, chino, hindi, árabe, portugués, francés, ruso, alemán, japonés, indonesio, bengalí e italiano.
|
|
||||||
- [x] Ejecutar escaneo UTF-8 sobre ARB/código tocado y corregir corrupciones visibles en los textos migrados.
|
|
||||||
- [ ] Validar no solo el guardado UTF-8 en código, sino también el render real en la aplicación para acentos, ñ, signos, alfabetos no latinos y direcciones RTL.
|
|
||||||
- [ ] Repasar absolutamente todos los literales de la aplicación en todas las pantallas, componentes, servicios con mensajes visibles y notificaciones.
|
|
||||||
- [ ] Soportar formatos locales de fecha, hora, números y duración usando helpers centralizados.
|
|
||||||
- [ ] Resolver correctamente singular/plural y variantes por cantidad, por ejemplo `1 emisora` vs `2 emisoras`.
|
|
||||||
- [ ] Revisar profesionalmente todas las traducciones nuevas con hablantes nativos o servicio especializado antes de considerarlas definitivas.
|
|
||||||
- [ ] Preparar traducciones adicionales si se decide ampliar más allá del conjunto inicial.
|
|
||||||
- [ ] Revisar la aplicación de Farolero como referencia para detectar el conjunto de idiomas que nos interesa mantener.
|
|
||||||
- [ ] Verificar que no queda ningún literal hardcodeado fuera del sistema de traducciones.
|
|
||||||
|
|
||||||
## UX y accesibilidad visual
|
|
||||||
|
|
||||||
- [x] Revisar los paneles informativos superiores de cada pantalla: recuperar márgenes internos elegantes para que el texto no quede pegado a los bordes.
|
|
||||||
- [x] Añadir comportamiento adaptativo en el header premium para escalas de texto grandes y pantallas estrechas.
|
|
||||||
- [ ] Probar la aplicación con escalas de texto grandes/muy grandes del sistema en dispositivo real o golden tests.
|
|
||||||
- [ ] Diseñar una solución elegante para textos largos en todos los paneles secundarios: reflow, límites razonables, scroll, wraps controlados y jerarquías que mantengan la estética AAA.
|
|
||||||
|
|
||||||
## Grabaciones
|
|
||||||
|
|
||||||
- [x] Añadir en Ajustes un acceso elegante para abrir la carpeta de grabaciones con el gestor de ficheros del sistema mediante intent.
|
|
||||||
- [x] Añadir configuración de tamaño máximo de fichero de grabación; valor por defecto: 500 MB.
|
|
||||||
- [x] Detener automáticamente la grabación si se para o pausa la reproducción.
|
|
||||||
- [x] Detener automáticamente la grabación si se cambia de emisora.
|
|
||||||
- [ ] Probar en Android real que el intent de carpeta funciona con rutas internas y rutas escogidas por el usuario.
|
|
||||||
|
|
||||||
## Búsqueda de emisoras
|
|
||||||
|
|
||||||
- [x] Añadir filtro de calidad mínima de reproducción en kbps en el buscador de emisoras.
|
|
||||||
|
|
||||||
## Favoritos
|
|
||||||
|
|
||||||
- [x] Revisar el sistema de guardado de favoritos en instalaciones nuevas y migradas: inicialización de SQLite, creación de ruta/base de datos, migraciones de columnas y refresco de estado tras guardar. Reporte: en un móvil no se están guardando favoritos.
|
|
||||||
- [ ] Añadir tests de regresión para favoritos en base de datos real/migrada, incluyendo esquemas antiguos y primera instalación limpia.
|
|
||||||
|
|
||||||
## Agrupaciones de favoritos
|
|
||||||
|
|
||||||
- [x] Permitir crear listas de favoritos con nombre corto configurable por el usuario desde Ajustes.
|
|
||||||
- [x] Mantener siempre un grupo interno por defecto traducible llamado "Sin asignar", no editable y no borrable.
|
|
||||||
- [x] Gestionar desde la vista Favoritos qué emisoras pertenecen a cada agrupación/lista.
|
|
||||||
- [x] Diseñar migración SQLite base para asociar favoritos existentes al grupo "Sin asignar" sin perder datos.
|
|
||||||
- [x] Completar UI en Ajustes para crear, editar y borrar listas de favoritos.
|
|
||||||
- [x] Completar UI en Favoritos para mover emisoras entre listas.
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("kotlin-android")
|
id("kotlin-android")
|
||||||
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
id("dev.flutter.flutter-gradle-plugin")
|
id("dev.flutter.flutter-gradle-plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,24 +20,21 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId = "es.freetimelab.pluriwave"
|
applicationId = "es.freetimelab.pluriwave"
|
||||||
|
// You can update the following values to match your application needs.
|
||||||
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||||
minSdk = flutter.minSdkVersion
|
minSdk = flutter.minSdkVersion
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = flutter.versionCode
|
versionCode = flutter.versionCode
|
||||||
versionName = flutter.versionName
|
versionName = flutter.versionName
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
|
||||||
create("release") {
|
|
||||||
// Configurado por el workflow via android/key.properties
|
|
||||||
// Keystore: ~/.openclaw/workspace/.secure/pluriwave/pluriwave-upload.jks
|
|
||||||
// Alias: pluriwave-upload
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
signingConfig = signingConfigs.getByName("release")
|
// TODO: Add your own signing config for the release build.
|
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,6 @@
|
|||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
|
||||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
|
||||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM"/>
|
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
|
||||||
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="PluriWave"
|
android:label="PluriWave"
|
||||||
@@ -25,8 +17,6 @@
|
|||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
android:showWhenLocked="true"
|
|
||||||
android:turnScreenOn="true"
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
@@ -50,11 +40,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service
|
|
||||||
android:name=".PluriWaveAlarmService"
|
|
||||||
android:foregroundServiceType="mediaPlayback"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<!-- Receptor de controles de media (auriculares, notificación) -->
|
<!-- Receptor de controles de media (auriculares, notificación) -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
||||||
@@ -64,38 +49,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<receiver
|
|
||||||
android:name=".PluriWaveAlarmReceiver"
|
|
||||||
android:exported="false">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="es.freetimelab.pluriwave.alarm.FIRE"/>
|
|
||||||
<action android:name="es.freetimelab.pluriwave.alarm.PRE_NOTICE"/>
|
|
||||||
<action android:name="es.freetimelab.pluriwave.alarm.SKIP_NEXT"/>
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
<receiver
|
|
||||||
android:name=".PluriWaveBootReceiver"
|
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
|
||||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
|
||||||
<action android:name="android.intent.action.TIME_SET"/>
|
|
||||||
<action android:name="android.intent.action.TIMEZONE_CHANGED"/>
|
|
||||||
<action android:name="android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED"/>
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
<provider
|
|
||||||
android:name="androidx.core.content.FileProvider"
|
|
||||||
android:authorities="${applicationId}.fileprovider"
|
|
||||||
android:exported="false"
|
|
||||||
android:grantUriPermissions="true">
|
|
||||||
<meta-data
|
|
||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
||||||
android:resource="@xml/pluriwave_file_paths" />
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="flutterEmbedding"
|
android:name="flutterEmbedding"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
|
|||||||
@@ -1,311 +0,0 @@
|
|||||||
package es.freetimelab.pluriwave
|
|
||||||
|
|
||||||
import android.app.AlarmManager
|
|
||||||
import android.app.PendingIntent
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Build
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.core.app.NotificationManagerCompat
|
|
||||||
import org.json.JSONObject
|
|
||||||
|
|
||||||
class AlarmScheduler(private val context: Context) {
|
|
||||||
private val tag = "PluriWave"
|
|
||||||
private val alarmManager =
|
|
||||||
context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
|
||||||
|
|
||||||
fun scheduleAlarm(
|
|
||||||
id: String,
|
|
||||||
title: String,
|
|
||||||
triggerAtMillis: Long,
|
|
||||||
preNoticeAtMillis: Long,
|
|
||||||
stationName: String?,
|
|
||||||
stationUrl: String?,
|
|
||||||
fallbackSound: String?,
|
|
||||||
volume: Float
|
|
||||||
): Boolean {
|
|
||||||
Log.d(
|
|
||||||
tag,
|
|
||||||
"alarm.schedule id=$id title=$title triggerAtMillis=$triggerAtMillis preNoticeAtMillis=$preNoticeAtMillis canExact=${canScheduleExactAlarms()}"
|
|
||||||
)
|
|
||||||
val alarmIntent = PendingIntent.getBroadcast(
|
|
||||||
context,
|
|
||||||
requestCode(id, 1),
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_FIRE
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, id)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_STATION_NAME, stationName)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_STATION_URL, stationUrl)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_FALLBACK_SOUND, fallbackSound)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_VOLUME, volume)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
val showIntent = PendingIntent.getActivity(
|
|
||||||
context,
|
|
||||||
requestCode(id, 2),
|
|
||||||
Intent(context, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, id)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ACTION, PluriWaveAlarmReceiver.ACTION_FIRE)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
val mainScheduled = scheduleMainAlarm(id, triggerAtMillis, showIntent, alarmIntent)
|
|
||||||
if (mainScheduled) {
|
|
||||||
saveScheduledAlarm(
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
triggerAtMillis,
|
|
||||||
preNoticeAtMillis,
|
|
||||||
stationName,
|
|
||||||
stationUrl,
|
|
||||||
fallbackSound,
|
|
||||||
volume
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
removeScheduledAlarm(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
val now = System.currentTimeMillis()
|
|
||||||
if (!mainScheduled) {
|
|
||||||
Log.w(tag, "alarm.schedule main alarm fallback failed or degraded id=$id")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preNoticeAtMillis > now) {
|
|
||||||
try {
|
|
||||||
alarmManager.setExactAndAllowWhileIdle(
|
|
||||||
AlarmManager.RTC_WAKEUP,
|
|
||||||
preNoticeAtMillis,
|
|
||||||
PendingIntent.getBroadcast(
|
|
||||||
context,
|
|
||||||
requestCode(id, 3),
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_PRE_NOTICE
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, id)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE, title)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule preNotice OK id=$id")
|
|
||||||
} catch (_: SecurityException) {
|
|
||||||
// The main alarm is already scheduled with setAlarmClock.
|
|
||||||
Log.w(tag, "alarm.schedule preNotice SecurityException id=$id")
|
|
||||||
}
|
|
||||||
} else if (triggerAtMillis > now) {
|
|
||||||
context.sendBroadcast(
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_PRE_NOTICE
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, id)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE, title)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule preNotice immediate id=$id")
|
|
||||||
} else {
|
|
||||||
Log.d(tag, "alarm.schedule preNotice skipped id=$id")
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun scheduleMainAlarm(
|
|
||||||
id: String,
|
|
||||||
triggerAtMillis: Long,
|
|
||||||
showIntent: PendingIntent,
|
|
||||||
alarmIntent: PendingIntent
|
|
||||||
): Boolean {
|
|
||||||
try {
|
|
||||||
alarmManager.setAlarmClock(
|
|
||||||
AlarmManager.AlarmClockInfo(triggerAtMillis, showIntent),
|
|
||||||
alarmIntent
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule setAlarmClock OK id=$id")
|
|
||||||
return true
|
|
||||||
} catch (error: SecurityException) {
|
|
||||||
Log.e(tag, "alarm.schedule setAlarmClock SecurityException id=$id", error)
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "alarm.schedule setAlarmClock ERROR id=$id", error)
|
|
||||||
}
|
|
||||||
|
|
||||||
return try {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && alarmManager.canScheduleExactAlarms()) {
|
|
||||||
alarmManager.setExactAndAllowWhileIdle(
|
|
||||||
AlarmManager.RTC_WAKEUP,
|
|
||||||
triggerAtMillis,
|
|
||||||
alarmIntent
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule setExactAndAllowWhileIdle fallback OK id=$id")
|
|
||||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
||||||
Log.e(
|
|
||||||
tag,
|
|
||||||
"alarm.schedule exact permission missing; refusing inexact fallback id=$id"
|
|
||||||
)
|
|
||||||
return false
|
|
||||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
alarmManager.setAndAllowWhileIdle(
|
|
||||||
AlarmManager.RTC_WAKEUP,
|
|
||||||
triggerAtMillis,
|
|
||||||
alarmIntent
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule setAndAllowWhileIdle fallback OK id=$id")
|
|
||||||
} else {
|
|
||||||
alarmManager.set(
|
|
||||||
AlarmManager.RTC_WAKEUP,
|
|
||||||
triggerAtMillis,
|
|
||||||
alarmIntent
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.schedule set fallback OK id=$id")
|
|
||||||
}
|
|
||||||
true
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "alarm.schedule fallback ERROR id=$id", error)
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun cancelAlarm(id: String) {
|
|
||||||
Log.d(tag, "alarm.cancel id=$id")
|
|
||||||
removeScheduledAlarm(id)
|
|
||||||
cancelPending("fire", pendingFireIntent(id, PendingIntent.FLAG_NO_CREATE))
|
|
||||||
cancelPending("show", pendingShowIntent(id, PendingIntent.FLAG_NO_CREATE))
|
|
||||||
cancelPending("preNotice", pendingPreNoticeIntent(id, PendingIntent.FLAG_NO_CREATE))
|
|
||||||
NotificationManagerCompat.from(context).cancel(
|
|
||||||
PluriWaveAlarmReceiver.notificationIdForAlarm(id)
|
|
||||||
)
|
|
||||||
NotificationManagerCompat.from(context).cancel(
|
|
||||||
PluriWaveAlarmReceiver.fireNotificationIdForAlarm(id)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun dismissFireNotification(id: String) {
|
|
||||||
NotificationManagerCompat.from(context).cancel(
|
|
||||||
PluriWaveAlarmReceiver.fireNotificationIdForAlarm(id)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun canScheduleExactAlarms(): Boolean {
|
|
||||||
return Build.VERSION.SDK_INT < Build.VERSION_CODES.S ||
|
|
||||||
alarmManager.canScheduleExactAlarms()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun reschedulePersistedAlarms() {
|
|
||||||
val now = System.currentTimeMillis()
|
|
||||||
for (id in prefs().getStringSet(KEY_IDS, emptySet()).orEmpty()) {
|
|
||||||
val raw = prefs().getString("$KEY_ALARM_PREFIX$id", null) ?: continue
|
|
||||||
try {
|
|
||||||
val data = JSONObject(raw)
|
|
||||||
val triggerAt = data.optLong("triggerAtMillis", 0L)
|
|
||||||
if (triggerAt <= now) {
|
|
||||||
Log.d(tag, "alarm.reschedule skip stale id=$id triggerAt=$triggerAt")
|
|
||||||
removeScheduledAlarm(id)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
scheduleAlarm(
|
|
||||||
id = id,
|
|
||||||
title = data.optString("title", "PluriWave"),
|
|
||||||
triggerAtMillis = triggerAt,
|
|
||||||
preNoticeAtMillis = data.optLong("preNoticeAtMillis", 0L),
|
|
||||||
stationName = data.optString("stationName").takeIf { it.isNotBlank() },
|
|
||||||
stationUrl = data.optString("stationUrl").takeIf { it.isNotBlank() },
|
|
||||||
fallbackSound = data.optString("fallbackSound").takeIf { it.isNotBlank() },
|
|
||||||
volume = data.optDouble("volume", 0.85).toFloat()
|
|
||||||
)
|
|
||||||
Log.d(tag, "alarm.reschedule OK id=$id")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "alarm.reschedule failed id=$id", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun saveScheduledAlarm(
|
|
||||||
id: String,
|
|
||||||
title: String,
|
|
||||||
triggerAtMillis: Long,
|
|
||||||
preNoticeAtMillis: Long,
|
|
||||||
stationName: String?,
|
|
||||||
stationUrl: String?,
|
|
||||||
fallbackSound: String?,
|
|
||||||
volume: Float
|
|
||||||
) {
|
|
||||||
val ids = prefs().getStringSet(KEY_IDS, emptySet()).orEmpty().toMutableSet()
|
|
||||||
ids.add(id)
|
|
||||||
val data = JSONObject().apply {
|
|
||||||
put("title", title)
|
|
||||||
put("triggerAtMillis", triggerAtMillis)
|
|
||||||
put("preNoticeAtMillis", preNoticeAtMillis)
|
|
||||||
put("stationName", stationName)
|
|
||||||
put("stationUrl", stationUrl)
|
|
||||||
put("fallbackSound", fallbackSound)
|
|
||||||
put("volume", volume)
|
|
||||||
}
|
|
||||||
prefs().edit()
|
|
||||||
.putStringSet(KEY_IDS, ids)
|
|
||||||
.putString("$KEY_ALARM_PREFIX$id", data.toString())
|
|
||||||
.apply()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun removeScheduledAlarm(id: String) {
|
|
||||||
val ids = prefs().getStringSet(KEY_IDS, emptySet()).orEmpty().toMutableSet()
|
|
||||||
ids.remove(id)
|
|
||||||
prefs().edit()
|
|
||||||
.putStringSet(KEY_IDS, ids)
|
|
||||||
.remove("$KEY_ALARM_PREFIX$id")
|
|
||||||
.apply()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun prefs() = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
|
|
||||||
|
|
||||||
private fun cancelPending(name: String, pendingIntent: PendingIntent?) {
|
|
||||||
if (pendingIntent == null) {
|
|
||||||
Log.d(tag, "alarm.cancel $name no pending intent")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
alarmManager.cancel(pendingIntent)
|
|
||||||
pendingIntent.cancel()
|
|
||||||
Log.d(tag, "alarm.cancel $name OK")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun pendingFireIntent(id: String, flags: Int): PendingIntent? =
|
|
||||||
PendingIntent.getBroadcast(
|
|
||||||
context,
|
|
||||||
requestCode(id, 1),
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_FIRE
|
|
||||||
},
|
|
||||||
flags or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun pendingShowIntent(id: String, flags: Int): PendingIntent? =
|
|
||||||
PendingIntent.getActivity(
|
|
||||||
context,
|
|
||||||
requestCode(id, 2),
|
|
||||||
Intent(context, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ACTION, PluriWaveAlarmReceiver.ACTION_FIRE)
|
|
||||||
},
|
|
||||||
flags or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun pendingPreNoticeIntent(id: String, flags: Int): PendingIntent? =
|
|
||||||
PendingIntent.getBroadcast(
|
|
||||||
context,
|
|
||||||
requestCode(id, 3),
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_PRE_NOTICE
|
|
||||||
},
|
|
||||||
flags or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun requestCode(id: String, slot: Int): Int = 31 * id.hashCode() + slot
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val PREFS = "pluriwave_alarm_scheduler"
|
|
||||||
private const val KEY_IDS = "scheduled_alarm_ids"
|
|
||||||
private const val KEY_ALARM_PREFIX = "scheduled_alarm_"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,494 +1,5 @@
|
|||||||
package es.freetimelab.pluriwave
|
package es.freetimelab.pluriwave
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.content.ClipData
|
|
||||||
import android.content.Intent
|
|
||||||
import android.content.ActivityNotFoundException
|
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.net.Uri
|
|
||||||
import android.media.audiofx.Visualizer
|
|
||||||
import android.app.AlarmManager
|
|
||||||
import android.content.Context
|
|
||||||
import android.os.Build
|
|
||||||
import android.os.Environment
|
|
||||||
import android.os.Handler
|
|
||||||
import android.os.Looper
|
|
||||||
import android.provider.DocumentsContract
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.core.app.NotificationManagerCompat
|
|
||||||
import androidx.core.content.FileProvider
|
|
||||||
import com.ryanheise.audioservice.AudioServiceActivity
|
import com.ryanheise.audioservice.AudioServiceActivity
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.plugin.common.EventChannel
|
|
||||||
import io.flutter.plugin.common.MethodChannel
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
class MainActivity : AudioServiceActivity() {
|
class MainActivity : AudioServiceActivity()
|
||||||
private val tag = "PluriWave"
|
|
||||||
private val visualizerChannel = "pluriwave/audio_visualizer"
|
|
||||||
private val alarmChannel = "pluriwave/alarm_scheduler"
|
|
||||||
private val fileActionsChannel = "pluriwave/file_actions"
|
|
||||||
private val permissionRequestCode = 4821
|
|
||||||
private var visualizer: Visualizer? = null
|
|
||||||
private var pendingSink: EventChannel.EventSink? = null
|
|
||||||
private var pendingArgs: Map<*, *>? = null
|
|
||||||
private var alarmMethodChannel: MethodChannel? = null
|
|
||||||
private val mainHandler = Handler(Looper.getMainLooper())
|
|
||||||
|
|
||||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
|
||||||
super.configureFlutterEngine(flutterEngine)
|
|
||||||
EventChannel(
|
|
||||||
flutterEngine.dartExecutor.binaryMessenger,
|
|
||||||
visualizerChannel
|
|
||||||
).setStreamHandler(object : EventChannel.StreamHandler {
|
|
||||||
override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
|
|
||||||
pendingSink = events
|
|
||||||
pendingArgs = arguments as? Map<*, *>
|
|
||||||
startVisualizerWhenAllowed()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCancel(arguments: Any?) {
|
|
||||||
stopVisualizer()
|
|
||||||
pendingSink = null
|
|
||||||
pendingArgs = null
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
val alarmScheduler = AlarmScheduler(this)
|
|
||||||
alarmMethodChannel = MethodChannel(
|
|
||||||
flutterEngine.dartExecutor.binaryMessenger,
|
|
||||||
alarmChannel
|
|
||||||
)
|
|
||||||
alarmMethodChannel?.setMethodCallHandler { call, result ->
|
|
||||||
when (call.method) {
|
|
||||||
"scheduleAlarm" -> {
|
|
||||||
val id = call.argument<String>("id")
|
|
||||||
val title = call.argument<String>("title") ?: "PluriWave"
|
|
||||||
val triggerAtMillis = call.argument<Long>("triggerAtMillis")
|
|
||||||
val preNoticeAtMillis = call.argument<Long>("preNoticeAtMillis") ?: 0L
|
|
||||||
val stationName = call.argument<String>("stationName")
|
|
||||||
val stationUrl = call.argument<String>("stationUrl")
|
|
||||||
val fallbackSound = call.argument<String>("fallbackSound")
|
|
||||||
val volume = call.argument<Number>("volume")?.toFloat() ?: 0.85f
|
|
||||||
Log.d(tag, "alarm.channel scheduleAlarm id=$id triggerAtMillis=$triggerAtMillis preNoticeAtMillis=$preNoticeAtMillis")
|
|
||||||
if (id == null || triggerAtMillis == null) {
|
|
||||||
Log.w(tag, "alarm.channel scheduleAlarm invalid id=$id triggerAtMillis=$triggerAtMillis")
|
|
||||||
result.error("INVALID_ALARM", "Missing alarm id or trigger time", null)
|
|
||||||
} else {
|
|
||||||
val scheduled = alarmScheduler.scheduleAlarm(
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
triggerAtMillis,
|
|
||||||
preNoticeAtMillis,
|
|
||||||
stationName,
|
|
||||||
stationUrl,
|
|
||||||
fallbackSound,
|
|
||||||
volume
|
|
||||||
)
|
|
||||||
result.success(scheduled)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"cancelAlarm" -> {
|
|
||||||
val id = call.argument<String>("id")
|
|
||||||
Log.d(tag, "alarm.channel cancelAlarm id=$id")
|
|
||||||
if (id == null) {
|
|
||||||
result.error("INVALID_ALARM", "Missing alarm id", null)
|
|
||||||
} else {
|
|
||||||
alarmScheduler.cancelAlarm(id)
|
|
||||||
result.success(null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"dismissAlarmNotification" -> {
|
|
||||||
val id = call.argument<String>("id")
|
|
||||||
Log.d(tag, "alarm.channel dismissAlarmNotification id=$id")
|
|
||||||
if (id == null) {
|
|
||||||
result.error("INVALID_ALARM", "Missing alarm id", null)
|
|
||||||
} else {
|
|
||||||
PluriWaveAlarmService.stop(this, id)
|
|
||||||
alarmScheduler.dismissFireNotification(id)
|
|
||||||
result.success(null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"stopNativeAlarmSound" -> {
|
|
||||||
val id = call.argument<String>("id")
|
|
||||||
Log.d(tag, "alarm.channel stopNativeAlarmSound id=$id")
|
|
||||||
if (id == null) {
|
|
||||||
result.error("INVALID_ALARM", "Missing alarm id", null)
|
|
||||||
} else {
|
|
||||||
PluriWaveAlarmService.stop(this, id)
|
|
||||||
result.success(null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"diagnostics" -> {
|
|
||||||
Log.d(tag, "alarm.channel diagnostics")
|
|
||||||
result.success(
|
|
||||||
mapOf(
|
|
||||||
"canScheduleExactAlarms" to alarmScheduler.canScheduleExactAlarms(),
|
|
||||||
"notificationsEnabled" to NotificationManagerCompat.from(this).areNotificationsEnabled(),
|
|
||||||
"manufacturer" to Build.MANUFACTURER,
|
|
||||||
"sdkInt" to Build.VERSION.SDK_INT
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
"requestExactAlarmPermission" -> {
|
|
||||||
Log.d(tag, "alarm.channel requestExactAlarmPermission")
|
|
||||||
result.success(requestExactAlarmPermission())
|
|
||||||
}
|
|
||||||
"getInitialAlarmIntent" -> {
|
|
||||||
val payload = alarmPayload(intent)
|
|
||||||
Log.d(tag, "alarm.channel getInitialAlarmIntent payload=$payload")
|
|
||||||
result.success(payload)
|
|
||||||
intent?.removeExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ACTION)
|
|
||||||
}
|
|
||||||
else -> result.notImplemented()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MethodChannel(
|
|
||||||
flutterEngine.dartExecutor.binaryMessenger,
|
|
||||||
fileActionsChannel
|
|
||||||
).setMethodCallHandler { call, result ->
|
|
||||||
when (call.method) {
|
|
||||||
"openDirectory" -> {
|
|
||||||
val path = call.argument<String>("path")
|
|
||||||
Log.d(tag, "file_actions.openDirectory path=$path")
|
|
||||||
if (path.isNullOrBlank()) {
|
|
||||||
result.success(false)
|
|
||||||
} else {
|
|
||||||
result.success(openDirectory(path))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"viewDirectory" -> {
|
|
||||||
val path = call.argument<String>("path")
|
|
||||||
Log.d(tag, "file_actions.viewDirectory path=$path")
|
|
||||||
if (path.isNullOrBlank()) {
|
|
||||||
result.success(false)
|
|
||||||
} else {
|
|
||||||
result.success(viewDirectory(path))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"openFile" -> {
|
|
||||||
val path = call.argument<String>("path")
|
|
||||||
val mimeType = call.argument<String>("mimeType") ?: "audio/*"
|
|
||||||
Log.d(tag, "file_actions.openFile path=$path mimeType=$mimeType")
|
|
||||||
if (path.isNullOrBlank()) {
|
|
||||||
result.success(false)
|
|
||||||
} else {
|
|
||||||
result.success(openFile(path, mimeType))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else -> result.notImplemented()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
|
||||||
super.onNewIntent(intent)
|
|
||||||
setIntent(intent)
|
|
||||||
val payload = alarmPayload(intent)
|
|
||||||
if (payload.isNotEmpty()) {
|
|
||||||
Log.d(tag, "alarm.channel onNewIntent payload=$payload")
|
|
||||||
alarmMethodChannel?.invokeMethod("alarmFired", payload)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun alarmPayload(intent: Intent?): Map<String, Any> {
|
|
||||||
if (intent == null) return emptyMap()
|
|
||||||
val action = intent.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ACTION)
|
|
||||||
?: return emptyMap()
|
|
||||||
val alarmId = intent.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID)
|
|
||||||
?: return emptyMap()
|
|
||||||
val title = intent.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE)
|
|
||||||
?: "PluriWave"
|
|
||||||
return mapOf(
|
|
||||||
"alarmId" to alarmId,
|
|
||||||
"alarmTitle" to title,
|
|
||||||
"alarmAction" to action
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun requestExactAlarmPermission(): Boolean {
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) return true
|
|
||||||
val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
|
||||||
if (alarmManager.canScheduleExactAlarms()) return true
|
|
||||||
return try {
|
|
||||||
startActivity(
|
|
||||||
Intent(android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply {
|
|
||||||
data = Uri.parse("package:$packageName")
|
|
||||||
}
|
|
||||||
)
|
|
||||||
true
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "alarm.channel requestExactAlarmPermission failed", error)
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun openDirectory(path: String): Boolean {
|
|
||||||
val folder = File(path)
|
|
||||||
if (!folder.exists()) {
|
|
||||||
Log.w(tag, "file_actions.openDirectory missing path=$path")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (!folder.isDirectory) {
|
|
||||||
Log.w(tag, "file_actions.openDirectory not directory path=$path")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
val fileProviderIntent = runCatching {
|
|
||||||
val uri = FileProvider.getUriForFile(
|
|
||||||
this,
|
|
||||||
"$packageName.fileprovider",
|
|
||||||
folder
|
|
||||||
)
|
|
||||||
Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
setDataAndType(uri, "resource/folder")
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
}.getOrNull()
|
|
||||||
|
|
||||||
val documentIntent = Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
directoryTreeUri(path)?.let { uri ->
|
|
||||||
setDataAndType(uri, DocumentsContract.Document.MIME_TYPE_DIR)
|
|
||||||
}
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
|
|
||||||
val opened =
|
|
||||||
openIntentSafely(fileProviderIntent, "file_actions.openDirectory fileProvider", path) ||
|
|
||||||
openIntentSafely(documentIntent, "file_actions.openDirectory documents", path)
|
|
||||||
if (!opened) {
|
|
||||||
Log.w(tag, "file_actions.openDirectory unable to open path=$path")
|
|
||||||
}
|
|
||||||
return opened
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun viewDirectory(path: String): Boolean {
|
|
||||||
val directory = File(path)
|
|
||||||
if (!directory.exists()) {
|
|
||||||
directory.mkdirs()
|
|
||||||
}
|
|
||||||
|
|
||||||
val candidates = mutableListOf<Intent>()
|
|
||||||
directoryDocumentUri(path)?.let { uri ->
|
|
||||||
candidates.add(
|
|
||||||
Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
setDataAndType(uri, "vnd.android.document/directory")
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
candidates.add(
|
|
||||||
Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
setData(uri)
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
val uri = FileProvider.getUriForFile(this, "$packageName.fileprovider", directory)
|
|
||||||
candidates.add(
|
|
||||||
Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
setDataAndType(uri, "resource/folder")
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.w(tag, "file_actions.viewDirectory fileprovider unavailable path=$path", error)
|
|
||||||
}
|
|
||||||
|
|
||||||
for (intent in candidates) {
|
|
||||||
try {
|
|
||||||
startActivity(Intent.createChooser(intent, "Abrir carpeta"))
|
|
||||||
Log.d(tag, "file_actions.viewDirectory launched path=$path")
|
|
||||||
return true
|
|
||||||
} catch (_: ActivityNotFoundException) {
|
|
||||||
Log.w(tag, "file_actions.viewDirectory no activity for candidate path=$path")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "file_actions.viewDirectory candidate failed path=$path", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun openIntentSafely(intent: Intent?, origin: String, path: String): Boolean {
|
|
||||||
if (intent == null || intent.data == null) return false
|
|
||||||
return try {
|
|
||||||
startActivity(intent)
|
|
||||||
Log.d(tag, "$origin launched path=$path")
|
|
||||||
true
|
|
||||||
} catch (_: ActivityNotFoundException) {
|
|
||||||
Log.w(tag, "$origin no activity for path=$path")
|
|
||||||
false
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "$origin failed path=$path", error)
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun openFile(path: String, mimeType: String): Boolean {
|
|
||||||
val file = File(path)
|
|
||||||
if (!file.exists()) {
|
|
||||||
Log.w(tag, "file_actions.openFile missing path=$path")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return try {
|
|
||||||
val uri = FileProvider.getUriForFile(
|
|
||||||
this,
|
|
||||||
"$packageName.fileprovider",
|
|
||||||
file
|
|
||||||
)
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
|
||||||
setDataAndType(uri, mimeType)
|
|
||||||
clipData = ClipData.newUri(contentResolver, "recording", uri)
|
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
|
||||||
}
|
|
||||||
startActivity(Intent.createChooser(intent, "Abrir grabación"))
|
|
||||||
Log.d(tag, "file_actions.openFile launched path=$path")
|
|
||||||
true
|
|
||||||
} catch (_: ActivityNotFoundException) {
|
|
||||||
Log.w(tag, "file_actions.openFile no viewer path=$path; opening parent")
|
|
||||||
openDirectory(file.parentFile?.absolutePath ?: path)
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(tag, "file_actions.openFile failed path=$path; opening parent", error)
|
|
||||||
openDirectory(file.parentFile?.absolutePath ?: path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun directoryTreeUri(path: String): Uri? {
|
|
||||||
val external = Environment.getExternalStorageDirectory()?.absolutePath ?: return null
|
|
||||||
if (!path.startsWith(external)) return null
|
|
||||||
|
|
||||||
val relative = path.removePrefix(external).trimStart('/')
|
|
||||||
val documentId = if (relative.isBlank()) "primary:" else "primary:$relative"
|
|
||||||
return DocumentsContract.buildTreeDocumentUri(
|
|
||||||
"com.android.externalstorage.documents",
|
|
||||||
documentId
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun directoryDocumentUri(path: String): Uri? {
|
|
||||||
val external = Environment.getExternalStorageDirectory()?.absolutePath ?: return null
|
|
||||||
if (!path.startsWith(external)) return null
|
|
||||||
|
|
||||||
val relative = path.removePrefix(external).trimStart('/')
|
|
||||||
val documentId = if (relative.isBlank()) "primary:" else "primary:$relative"
|
|
||||||
return DocumentsContract.buildDocumentUri(
|
|
||||||
"com.android.externalstorage.documents",
|
|
||||||
documentId
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startVisualizerWhenAllowed() {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
|
|
||||||
checkSelfPermission(Manifest.permission.RECORD_AUDIO)
|
|
||||||
!= PackageManager.PERMISSION_GRANTED
|
|
||||||
) {
|
|
||||||
requestPermissions(
|
|
||||||
arrayOf(Manifest.permission.RECORD_AUDIO),
|
|
||||||
permissionRequestCode
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
startVisualizer()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startVisualizer() {
|
|
||||||
val sink = pendingSink ?: return
|
|
||||||
val args = pendingArgs
|
|
||||||
val sessionId = (args?.get("sessionId") as? Number)?.toInt() ?: 0
|
|
||||||
val bands = ((args?.get("bands") as? Number)?.toInt() ?: 26).coerceIn(8, 96)
|
|
||||||
|
|
||||||
stopVisualizer()
|
|
||||||
|
|
||||||
try {
|
|
||||||
val captureSize = Visualizer.getCaptureSizeRange()[1]
|
|
||||||
visualizer = Visualizer(sessionId).apply {
|
|
||||||
enabled = false
|
|
||||||
setCaptureSize(captureSize)
|
|
||||||
setDataCaptureListener(
|
|
||||||
object : Visualizer.OnDataCaptureListener {
|
|
||||||
override fun onWaveFormDataCapture(
|
|
||||||
visualizer: Visualizer?,
|
|
||||||
waveform: ByteArray?,
|
|
||||||
samplingRate: Int
|
|
||||||
) {
|
|
||||||
val data = waveform ?: return
|
|
||||||
val values = downsample(data, bands)
|
|
||||||
mainHandler.post { sink.success(values) }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFftDataCapture(
|
|
||||||
visualizer: Visualizer?,
|
|
||||||
fft: ByteArray?,
|
|
||||||
samplingRate: Int
|
|
||||||
) = Unit
|
|
||||||
},
|
|
||||||
Visualizer.getMaxCaptureRate() / 2,
|
|
||||||
true,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
enabled = true
|
|
||||||
}
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
sink.error("VISUALIZER_UNAVAILABLE", error.message, null)
|
|
||||||
stopVisualizer()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun downsample(data: ByteArray, bands: Int): List<Double> {
|
|
||||||
if (data.isEmpty()) return emptyList()
|
|
||||||
val bucket = maxOf(1, data.size / bands)
|
|
||||||
val values = ArrayList<Double>(bands)
|
|
||||||
|
|
||||||
var index = 0
|
|
||||||
while (index < data.size && values.size < bands) {
|
|
||||||
var sum = 0.0
|
|
||||||
var count = 0
|
|
||||||
val end = minOf(index + bucket, data.size)
|
|
||||||
for (i in index until end) {
|
|
||||||
val centered = (data[i].toInt() and 0xFF) - 128
|
|
||||||
sum += kotlin.math.abs(centered) / 128.0
|
|
||||||
count++
|
|
||||||
}
|
|
||||||
values.add(if (count == 0) 0.0 else (sum / count).coerceIn(0.0, 1.0))
|
|
||||||
index = end
|
|
||||||
}
|
|
||||||
|
|
||||||
while (values.size < bands) values.add(0.0)
|
|
||||||
return values
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun stopVisualizer() {
|
|
||||||
try {
|
|
||||||
visualizer?.enabled = false
|
|
||||||
visualizer?.release()
|
|
||||||
} catch (_: Throwable) {
|
|
||||||
} finally {
|
|
||||||
visualizer = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(
|
|
||||||
requestCode: Int,
|
|
||||||
permissions: Array<out String>,
|
|
||||||
grantResults: IntArray
|
|
||||||
) {
|
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
|
||||||
if (requestCode != permissionRequestCode) return
|
|
||||||
|
|
||||||
if (grantResults.firstOrNull() == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
startVisualizer()
|
|
||||||
} else {
|
|
||||||
pendingSink?.error(
|
|
||||||
"RECORD_AUDIO_DENIED",
|
|
||||||
"Permiso de audio denegado para visualizar la onda real",
|
|
||||||
null
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
stopVisualizer()
|
|
||||||
super.onDestroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,199 +0,0 @@
|
|||||||
package es.freetimelab.pluriwave
|
|
||||||
|
|
||||||
import android.app.NotificationChannel
|
|
||||||
import android.app.NotificationManager
|
|
||||||
import android.app.PendingIntent
|
|
||||||
import android.content.BroadcastReceiver
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Build
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.core.app.NotificationCompat
|
|
||||||
import androidx.core.app.NotificationManagerCompat
|
|
||||||
|
|
||||||
class PluriWaveAlarmReceiver : BroadcastReceiver() {
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
|
||||||
val alarmId = intent.getStringExtra(EXTRA_ALARM_ID) ?: run {
|
|
||||||
Log.w(TAG, "alarm.receiver missing alarmId action=${intent.action}")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val title = intent.getStringExtra(EXTRA_ALARM_TITLE) ?: "PluriWave"
|
|
||||||
Log.d(TAG, "alarm.receiver action=${intent.action} id=$alarmId title=$title")
|
|
||||||
|
|
||||||
when (intent.action) {
|
|
||||||
ACTION_FIRE -> {
|
|
||||||
PluriWaveAlarmService.start(context, intent)
|
|
||||||
val launch = Intent(context, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(EXTRA_ALARM_ID, alarmId)
|
|
||||||
putExtra(EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(EXTRA_ALARM_ACTION, ACTION_FIRE)
|
|
||||||
}
|
|
||||||
showFireNotification(context, alarmId, title, launch)
|
|
||||||
try {
|
|
||||||
context.startActivity(launch)
|
|
||||||
Log.d(TAG, "alarm.receiver fire startActivity OK id=$alarmId")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(TAG, "alarm.receiver fire startActivity ERROR id=$alarmId", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ACTION_PRE_NOTICE -> {
|
|
||||||
showPreNoticeNotification(context, alarmId, title)
|
|
||||||
}
|
|
||||||
ACTION_SKIP_NEXT -> {
|
|
||||||
NotificationManagerCompat.from(context).cancel(notificationIdForAlarm(alarmId))
|
|
||||||
val launch = Intent(context, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(EXTRA_ALARM_ID, alarmId)
|
|
||||||
putExtra(EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(EXTRA_ALARM_ACTION, ACTION_SKIP_NEXT)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
context.startActivity(launch)
|
|
||||||
Log.d(TAG, "alarm.receiver skipNext startActivity OK id=$alarmId")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(TAG, "alarm.receiver skipNext startActivity ERROR id=$alarmId", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else -> Log.w(TAG, "alarm.receiver unknown action=${intent.action} id=$alarmId")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showFireNotification(
|
|
||||||
context: Context,
|
|
||||||
alarmId: String,
|
|
||||||
title: String,
|
|
||||||
launch: Intent
|
|
||||||
) {
|
|
||||||
ensureFireChannel(context)
|
|
||||||
val fullScreenIntent = PendingIntent.getActivity(
|
|
||||||
context,
|
|
||||||
requestCode(alarmId, 10),
|
|
||||||
launch,
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
val notification = NotificationCompat.Builder(context, FIRE_CHANNEL_ID)
|
|
||||||
.setSmallIcon(android.R.drawable.ic_lock_idle_alarm)
|
|
||||||
.setContentTitle("Alarma PluriWave")
|
|
||||||
.setContentText(title)
|
|
||||||
.setCategory(NotificationCompat.CATEGORY_ALARM)
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
|
||||||
.setOngoing(true)
|
|
||||||
.setAutoCancel(false)
|
|
||||||
.setContentIntent(fullScreenIntent)
|
|
||||||
.setFullScreenIntent(fullScreenIntent, true)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
try {
|
|
||||||
NotificationManagerCompat.from(context).notify(
|
|
||||||
fireNotificationIdForAlarm(alarmId),
|
|
||||||
notification,
|
|
||||||
)
|
|
||||||
Log.d(TAG, "alarm.notification fire shown id=$alarmId")
|
|
||||||
} catch (error: SecurityException) {
|
|
||||||
Log.e(TAG, "alarm.notification fire SecurityException id=$alarmId", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showPreNoticeNotification(context: Context, alarmId: String, title: String) {
|
|
||||||
ensureChannel(context)
|
|
||||||
|
|
||||||
val openAppIntent = PendingIntent.getActivity(
|
|
||||||
context,
|
|
||||||
requestCode(alarmId, 1),
|
|
||||||
Intent(context, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(EXTRA_ALARM_ID, alarmId)
|
|
||||||
putExtra(EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(EXTRA_ALARM_ACTION, ACTION_PRE_NOTICE)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
val skipNextIntent = PendingIntent.getBroadcast(
|
|
||||||
context,
|
|
||||||
requestCode(alarmId, 2),
|
|
||||||
Intent(context, PluriWaveAlarmReceiver::class.java).apply {
|
|
||||||
action = ACTION_SKIP_NEXT
|
|
||||||
putExtra(EXTRA_ALARM_ID, alarmId)
|
|
||||||
putExtra(EXTRA_ALARM_TITLE, title)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
val notification = NotificationCompat.Builder(context, CHANNEL_ID)
|
|
||||||
.setSmallIcon(android.R.drawable.ic_dialog_info)
|
|
||||||
.setContentTitle(title)
|
|
||||||
.setContentText("Empieza en 30 minutos")
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
|
||||||
.setCategory(NotificationCompat.CATEGORY_REMINDER)
|
|
||||||
.setSilent(true)
|
|
||||||
.setAutoCancel(true)
|
|
||||||
.setContentIntent(openAppIntent)
|
|
||||||
.addAction(0, "Omitir siguiente", skipNextIntent)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
try {
|
|
||||||
NotificationManagerCompat.from(context).notify(notificationIdForAlarm(alarmId), notification)
|
|
||||||
Log.d(TAG, "alarm.notification preNotice shown id=$alarmId")
|
|
||||||
} catch (error: SecurityException) {
|
|
||||||
Log.e(TAG, "alarm.notification preNotice SecurityException id=$alarmId", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun ensureFireChannel(context: Context) {
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return
|
|
||||||
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
|
||||||
val existing = manager.getNotificationChannel(FIRE_CHANNEL_ID)
|
|
||||||
if (existing != null) return
|
|
||||||
|
|
||||||
val channel = NotificationChannel(
|
|
||||||
FIRE_CHANNEL_ID,
|
|
||||||
"Alarmas sonando",
|
|
||||||
NotificationManager.IMPORTANCE_HIGH
|
|
||||||
).apply {
|
|
||||||
description = "Pantalla urgente cuando una alarma musical debe sonar"
|
|
||||||
enableVibration(true)
|
|
||||||
}
|
|
||||||
manager.createNotificationChannel(channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun ensureChannel(context: Context) {
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return
|
|
||||||
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
|
||||||
val existing = manager.getNotificationChannel(CHANNEL_ID)
|
|
||||||
if (existing != null) return
|
|
||||||
|
|
||||||
val channel = NotificationChannel(
|
|
||||||
CHANNEL_ID,
|
|
||||||
"Preavisos de alarmas",
|
|
||||||
NotificationManager.IMPORTANCE_LOW
|
|
||||||
).apply {
|
|
||||||
description = "Notificaciones silenciosas 30 minutos antes de la alarma"
|
|
||||||
setSound(null, null)
|
|
||||||
enableVibration(false)
|
|
||||||
}
|
|
||||||
manager.createNotificationChannel(channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun requestCode(id: String, slot: Int): Int = 47 * id.hashCode() + slot
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val TAG = "PluriWave"
|
|
||||||
const val CHANNEL_ID = "pluriwave_alarm_pre_notice"
|
|
||||||
const val FIRE_CHANNEL_ID = "pluriwave_alarm_fire"
|
|
||||||
const val ACTION_FIRE = "es.freetimelab.pluriwave.alarm.FIRE"
|
|
||||||
const val ACTION_PRE_NOTICE = "es.freetimelab.pluriwave.alarm.PRE_NOTICE"
|
|
||||||
const val ACTION_SKIP_NEXT = "es.freetimelab.pluriwave.alarm.SKIP_NEXT"
|
|
||||||
const val EXTRA_ALARM_ID = "alarmId"
|
|
||||||
const val EXTRA_ALARM_TITLE = "alarmTitle"
|
|
||||||
const val EXTRA_ALARM_ACTION = "alarmAction"
|
|
||||||
const val EXTRA_STATION_NAME = "stationName"
|
|
||||||
const val EXTRA_STATION_URL = "stationUrl"
|
|
||||||
const val EXTRA_FALLBACK_SOUND = "fallbackSound"
|
|
||||||
const val EXTRA_VOLUME = "volume"
|
|
||||||
|
|
||||||
fun notificationIdForAlarm(alarmId: String): Int = 53 * alarmId.hashCode() + 7
|
|
||||||
fun fireNotificationIdForAlarm(alarmId: String): Int = 59 * alarmId.hashCode() + 9
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,261 +0,0 @@
|
|||||||
package es.freetimelab.pluriwave
|
|
||||||
|
|
||||||
import android.app.NotificationChannel
|
|
||||||
import android.app.NotificationManager
|
|
||||||
import android.app.PendingIntent
|
|
||||||
import android.app.Service
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.media.AudioAttributes
|
|
||||||
import android.media.MediaPlayer
|
|
||||||
import android.os.Build
|
|
||||||
import android.os.IBinder
|
|
||||||
import android.os.PowerManager
|
|
||||||
import android.util.Log
|
|
||||||
import androidx.core.app.NotificationCompat
|
|
||||||
import androidx.core.app.NotificationManagerCompat
|
|
||||||
import androidx.core.content.ContextCompat
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
class PluriWaveAlarmService : Service() {
|
|
||||||
private var player: MediaPlayer? = null
|
|
||||||
private var wakeLock: PowerManager.WakeLock? = null
|
|
||||||
private var activeAlarmId: String? = null
|
|
||||||
|
|
||||||
override fun onBind(intent: Intent?): IBinder? = null
|
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
||||||
val action = intent?.action
|
|
||||||
val requestedId = intent?.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID)
|
|
||||||
Log.d(TAG, "alarm.service onStartCommand action=$action id=$requestedId active=$activeAlarmId")
|
|
||||||
|
|
||||||
when (action) {
|
|
||||||
ACTION_STOP -> {
|
|
||||||
stopAlarm(requestedId)
|
|
||||||
return START_NOT_STICKY
|
|
||||||
}
|
|
||||||
PluriWaveAlarmReceiver.ACTION_FIRE, null -> startAlarm(intent)
|
|
||||||
else -> Log.w(TAG, "alarm.service unknown action=$action id=$requestedId")
|
|
||||||
}
|
|
||||||
return START_NOT_STICKY
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startAlarm(intent: Intent?) {
|
|
||||||
val alarmId = intent?.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID) ?: return
|
|
||||||
if (activeAlarmId != null) {
|
|
||||||
Log.w(TAG, "alarm.service ignored id=$alarmId because active=$activeAlarmId")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
activeAlarmId = alarmId
|
|
||||||
|
|
||||||
val title = intent.getStringExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE) ?: "PluriWave"
|
|
||||||
val fallbackSound = intent.getStringExtra(PluriWaveAlarmReceiver.EXTRA_FALLBACK_SOUND)
|
|
||||||
val volume = intent.getFloatExtra(PluriWaveAlarmReceiver.EXTRA_VOLUME, 0.85f).coerceIn(0f, 1f)
|
|
||||||
|
|
||||||
acquireWakeLock()
|
|
||||||
startForeground(NOTIFICATION_ID, buildNotification(alarmId, title))
|
|
||||||
startAudio(alarmId, fallbackSound, volume)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startAudio(alarmId: String, fallbackSound: String?, volume: Float) {
|
|
||||||
player?.release()
|
|
||||||
player = null
|
|
||||||
|
|
||||||
val source = fallbackAssetPath(fallbackSound)
|
|
||||||
try {
|
|
||||||
player = MediaPlayer().apply {
|
|
||||||
setAudioAttributes(
|
|
||||||
AudioAttributes.Builder()
|
|
||||||
.setUsage(AudioAttributes.USAGE_ALARM)
|
|
||||||
.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
isLooping = true
|
|
||||||
setVolume(volume, volume)
|
|
||||||
setFallbackAssetDataSource(this, fallbackSound)
|
|
||||||
setOnPreparedListener {
|
|
||||||
it.start()
|
|
||||||
Log.d(TAG, "alarm.service audio started id=$alarmId source=$source")
|
|
||||||
}
|
|
||||||
setOnErrorListener { mp, what, extra ->
|
|
||||||
Log.e(TAG, "alarm.service audio error id=$alarmId what=$what extra=$extra source=$source")
|
|
||||||
mp.reset()
|
|
||||||
true
|
|
||||||
}
|
|
||||||
prepareAsync()
|
|
||||||
}
|
|
||||||
Log.d(TAG, "alarm.service audio preparing id=$alarmId source=$source")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(TAG, "alarm.service audio prepare failed id=$alarmId source=$source", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun stopAlarm(alarmId: String?) {
|
|
||||||
Log.d(TAG, "alarm.service stop id=$alarmId active=$activeAlarmId")
|
|
||||||
try {
|
|
||||||
player?.stop()
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.w(TAG, "alarm.service stop player failed", error)
|
|
||||||
}
|
|
||||||
player?.release()
|
|
||||||
player = null
|
|
||||||
activeAlarmId = null
|
|
||||||
releaseWakeLock()
|
|
||||||
if (alarmId != null) {
|
|
||||||
NotificationManagerCompat.from(this).cancel(
|
|
||||||
PluriWaveAlarmReceiver.fireNotificationIdForAlarm(alarmId)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
|
||||||
} else {
|
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
stopForeground(true)
|
|
||||||
}
|
|
||||||
stopSelf()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun buildNotification(alarmId: String, title: String) =
|
|
||||||
NotificationCompat.Builder(this, CHANNEL_ID)
|
|
||||||
.setSmallIcon(android.R.drawable.ic_lock_idle_alarm)
|
|
||||||
.setContentTitle("Alarma PluriWave")
|
|
||||||
.setContentText(title)
|
|
||||||
.setCategory(NotificationCompat.CATEGORY_ALARM)
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
|
||||||
.setOngoing(true)
|
|
||||||
.setAutoCancel(false)
|
|
||||||
.setFullScreenIntent(openAlarmPendingIntent(alarmId, title), true)
|
|
||||||
.setContentIntent(openAlarmPendingIntent(alarmId, title))
|
|
||||||
.addAction(0, "Detener", stopPendingIntent(alarmId))
|
|
||||||
.build()
|
|
||||||
|
|
||||||
private fun openAlarmPendingIntent(alarmId: String, title: String): PendingIntent =
|
|
||||||
PendingIntent.getActivity(
|
|
||||||
this,
|
|
||||||
requestCode(alarmId, 20),
|
|
||||||
Intent(this, MainActivity::class.java).apply {
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, alarmId)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_TITLE, title)
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ACTION, PluriWaveAlarmReceiver.ACTION_FIRE)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun stopPendingIntent(alarmId: String): PendingIntent =
|
|
||||||
PendingIntent.getService(
|
|
||||||
this,
|
|
||||||
requestCode(alarmId, 21),
|
|
||||||
Intent(this, PluriWaveAlarmService::class.java).apply {
|
|
||||||
action = ACTION_STOP
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, alarmId)
|
|
||||||
},
|
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun acquireWakeLock() {
|
|
||||||
if (wakeLock?.isHeld == true) return
|
|
||||||
val powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager
|
|
||||||
wakeLock = powerManager.newWakeLock(
|
|
||||||
PowerManager.PARTIAL_WAKE_LOCK,
|
|
||||||
"PluriWave:AlarmWakeLock"
|
|
||||||
).apply {
|
|
||||||
setReferenceCounted(false)
|
|
||||||
acquire(10 * 60 * 1000L)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun releaseWakeLock() {
|
|
||||||
try {
|
|
||||||
if (wakeLock?.isHeld == true) wakeLock?.release()
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.w(TAG, "alarm.service wakeLock release failed", error)
|
|
||||||
}
|
|
||||||
wakeLock = null
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setFallbackAssetDataSource(mediaPlayer: MediaPlayer, sound: String?) {
|
|
||||||
val path = fallbackAssetPath(sound)
|
|
||||||
try {
|
|
||||||
val descriptor = assets.openFd(path)
|
|
||||||
mediaPlayer.setDataSource(
|
|
||||||
descriptor.fileDescriptor,
|
|
||||||
descriptor.startOffset,
|
|
||||||
descriptor.length
|
|
||||||
)
|
|
||||||
descriptor.close()
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.w(TAG, "alarm.service asset descriptor failed path=$path; copying to cache", error)
|
|
||||||
val cached = File(cacheDir, path.substringAfterLast('/'))
|
|
||||||
assets.open(path).use { input ->
|
|
||||||
cached.outputStream().use { output -> input.copyTo(output) }
|
|
||||||
}
|
|
||||||
mediaPlayer.setDataSource(cached.absolutePath)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun fallbackAssetPath(sound: String?): String {
|
|
||||||
val fileName = when (sound) {
|
|
||||||
"campanaSuave" -> "alarm_campana_suave.wav"
|
|
||||||
"pulsoDigital" -> "alarm_pulso_digital.wav"
|
|
||||||
else -> "alarm_amanecer.wav"
|
|
||||||
}
|
|
||||||
return "flutter_assets/assets/audio/$fileName"
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
stopAlarm(activeAlarmId)
|
|
||||||
super.onDestroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val TAG = "PluriWave"
|
|
||||||
private const val CHANNEL_ID = "pluriwave_alarm_native"
|
|
||||||
private const val NOTIFICATION_ID = 92841
|
|
||||||
private const val ACTION_STOP = "es.freetimelab.pluriwave.alarm.STOP_NATIVE"
|
|
||||||
|
|
||||||
fun start(context: Context, source: Intent) {
|
|
||||||
ensureChannel(context)
|
|
||||||
val intent = Intent(context, PluriWaveAlarmService::class.java).apply {
|
|
||||||
action = PluriWaveAlarmReceiver.ACTION_FIRE
|
|
||||||
putExtras(source)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
ContextCompat.startForegroundService(context, intent)
|
|
||||||
Log.d(TAG, "alarm.service start requested")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(TAG, "alarm.service start failed", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun stop(context: Context, alarmId: String) {
|
|
||||||
val intent = Intent(context, PluriWaveAlarmService::class.java).apply {
|
|
||||||
action = ACTION_STOP
|
|
||||||
putExtra(PluriWaveAlarmReceiver.EXTRA_ALARM_ID, alarmId)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
context.stopService(intent)
|
|
||||||
Log.d(TAG, "alarm.service stop requested id=$alarmId")
|
|
||||||
} catch (error: Throwable) {
|
|
||||||
Log.e(TAG, "alarm.service stop request failed id=$alarmId", error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun ensureChannel(context: Context) {
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return
|
|
||||||
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
|
||||||
if (manager.getNotificationChannel(CHANNEL_ID) != null) return
|
|
||||||
val channel = NotificationChannel(
|
|
||||||
CHANNEL_ID,
|
|
||||||
"Alarma musical",
|
|
||||||
NotificationManager.IMPORTANCE_HIGH
|
|
||||||
).apply {
|
|
||||||
description = "Sonido de alarma musical con pantalla apagada"
|
|
||||||
enableVibration(true)
|
|
||||||
}
|
|
||||||
manager.createNotificationChannel(channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun requestCode(id: String, slot: Int): Int = 67 * id.hashCode() + slot
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package es.freetimelab.pluriwave
|
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.util.Log
|
|
||||||
|
|
||||||
class PluriWaveBootReceiver : BroadcastReceiver() {
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
|
||||||
when (intent.action) {
|
|
||||||
Intent.ACTION_BOOT_COMPLETED,
|
|
||||||
Intent.ACTION_MY_PACKAGE_REPLACED,
|
|
||||||
Intent.ACTION_TIME_CHANGED,
|
|
||||||
Intent.ACTION_TIMEZONE_CHANGED,
|
|
||||||
"android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED" -> {
|
|
||||||
Log.d(TAG, "alarm.bootReceiver action=${intent.action}")
|
|
||||||
AlarmScheduler(context).reschedulePersistedAlarms()
|
|
||||||
}
|
|
||||||
else -> Log.w(TAG, "alarm.bootReceiver unknown action=${intent.action}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val TAG = "PluriWave"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 656 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 656 B |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<files-path
|
|
||||||
name="files"
|
|
||||||
path="." />
|
|
||||||
<cache-path
|
|
||||||
name="cache"
|
|
||||||
path="." />
|
|
||||||
<external-files-path
|
|
||||||
name="external_files"
|
|
||||||
path="." />
|
|
||||||
<external-cache-path
|
|
||||||
name="external_cache"
|
|
||||||
path="." />
|
|
||||||
</paths>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# أهلاً بك في PluriWave
|
|
||||||
|
|
||||||
PluriWave هو راديوك العالمي المميز: محطات مباشرة، مفضلات منظمة، تسجيلات، معادل صوت ومنبّهات موسيقية ضمن تجربة مصممة بعناية.
|
|
||||||
|
|
||||||
## راديو مباشر
|
|
||||||
|
|
||||||
- ابحث عن المحطات حسب الاسم والبلد واللغة والجودة.
|
|
||||||
- استكشف المحطات القريبة واكتشف محطات جديدة.
|
|
||||||
- رتّب القوائم حسب الاسم أو الجودة.
|
|
||||||
|
|
||||||
## موسيقى بطريقتك
|
|
||||||
|
|
||||||
- احفظ المفضلات ونظّمها في مجموعات.
|
|
||||||
- اضبط المعادل العام أو إعدادات كل محطة.
|
|
||||||
- استخدم مؤقّت النوم بمدد مخصّصة.
|
|
||||||
|
|
||||||
## التسجيلات
|
|
||||||
|
|
||||||
- سجّل الراديو بدون إعادة ضغط البث الأصلي.
|
|
||||||
- حدّد الحجم الأقصى للملف لتبقى بأمان.
|
|
||||||
- افتح مجلد التسجيلات للمشاركة أو النقل أو التعديل.
|
|
||||||
|
|
||||||
## منبّهات موسيقية
|
|
||||||
|
|
||||||
- أنشئ منبّهات لمرة واحدة أو يومية أو لأيام العمل.
|
|
||||||
- اختر محطة مفضلة وصوتاً داخلياً آمناً.
|
|
||||||
- استخدم العطلات وتخطي التنفيذ التالي والغفوة.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# PluriWave-এ স্বাগতম
|
|
||||||
|
|
||||||
PluriWave আপনার প্রিমিয়াম বিশ্ব রেডিও: লাইভ স্টেশন, গোছানো ফেভারিট, রেকর্ডিং, ইকুয়ালাইজার এবং মিউজিক অ্যালার্ম—সবই যত্নসহ তৈরি এক অভিজ্ঞতায়।
|
|
||||||
|
|
||||||
## লাইভ রেডিও
|
|
||||||
|
|
||||||
- নাম, দেশ, ভাষা ও মান অনুযায়ী স্টেশন খুঁজুন।
|
|
||||||
- কাছাকাছি স্টেশন দেখুন এবং নতুন রেডিও আবিষ্কার করুন।
|
|
||||||
- তালিকা নাম বা মান অনুযায়ী সাজান।
|
|
||||||
|
|
||||||
## আপনার মতো করে সঙ্গীত
|
|
||||||
|
|
||||||
- ফেভারিট সংরক্ষণ করুন এবং গ্রুপে সাজান।
|
|
||||||
- গ্লোবাল ইকুয়ালাইজার বা স্টেশনভিত্তিক প্রিসেট ঠিক করুন।
|
|
||||||
- নিজের মতো সময় দিয়ে স্লিপ টাইমার ব্যবহার করুন।
|
|
||||||
|
|
||||||
## রেকর্ডিং
|
|
||||||
|
|
||||||
- মূল স্ট্রিম রিকমপ্রেস না করে রেডিও রেকর্ড করুন।
|
|
||||||
- নিরাপদ থাকতে সর্বোচ্চ ফাইল সাইজ সীমা দিন।
|
|
||||||
- শেয়ার, সরানো বা সম্পাদনার জন্য রেকর্ডিং ফোল্ডার খুলুন।
|
|
||||||
|
|
||||||
## মিউজিক অ্যালার্ম
|
|
||||||
|
|
||||||
- একবার, প্রতিদিন বা কর্মদিবসের অ্যালার্ম তৈরি করুন।
|
|
||||||
- প্রিয় স্টেশন ও নিরাপদ অভ্যন্তরীণ সাউন্ড বেছে নিন।
|
|
||||||
- ছুটি, পরের রান স্কিপ এবং স্নুজ ব্যবহার করুন।
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Willkommen bei PluriWave
|
|
||||||
|
|
||||||
PluriWave ist Ihr Premium-Weltradio: Live-Sender, organisierte Favoriten, Aufnahmen, Equalizer und Musikalarme in einer sorgfältig gestalteten Erfahrung.
|
|
||||||
|
|
||||||
## Live-Radio
|
|
||||||
|
|
||||||
- Suche nach Sendern nach Name, Land, Sprache und Qualität.
|
|
||||||
- Entdecke Sender in der Nähe und finde neue Radios.
|
|
||||||
- Sortiere Listen nach Name oder Qualität.
|
|
||||||
|
|
||||||
## Musik auf deine Art
|
|
||||||
|
|
||||||
- Speichere Favoriten und organisiere sie in Gruppen.
|
|
||||||
- Stelle den globalen Equalizer oder Sender-Presets ein.
|
|
||||||
- Nutze den Sleep-Timer mit eigenen Laufzeiten.
|
|
||||||
|
|
||||||
## Aufnahmen
|
|
||||||
|
|
||||||
- Nimm Radio auf, ohne den Original-Stream neu zu komprimieren.
|
|
||||||
- Begrenze die maximale Dateigröße für mehr Sicherheit.
|
|
||||||
- Öffne den Aufnahmeordner zum Teilen, Verschieben oder Bearbeiten von Dateien.
|
|
||||||
|
|
||||||
## Musikalarme
|
|
||||||
|
|
||||||
- Erstelle einmalige, tägliche oder Wochentags-Alarme.
|
|
||||||
- Wähle einen Lieblingssender und einen sicheren internen Ton.
|
|
||||||
- Nutze Feiertage, "nächste Ausführung überspringen" und Snooze.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Welcome to PluriWave
|
|
||||||
|
|
||||||
PluriWave is your premium world radio: live stations, organized favorites, recordings, equalizer and musical alarms in a carefully crafted experience.
|
|
||||||
|
|
||||||
## Live radio
|
|
||||||
|
|
||||||
- Search stations by name, country, language and quality.
|
|
||||||
- Explore nearby stations and discover new radio.
|
|
||||||
- Sort lists by name or quality.
|
|
||||||
|
|
||||||
## Music your way
|
|
||||||
|
|
||||||
- Save favorites and organize them into groups.
|
|
||||||
- Tune the global equalizer or per-station presets.
|
|
||||||
- Use the sleep timer with custom durations.
|
|
||||||
|
|
||||||
## Recordings
|
|
||||||
|
|
||||||
- Record radio without recompressing the original stream.
|
|
||||||
- Limit maximum file size to stay safe.
|
|
||||||
- Open the recordings folder to share, move or edit files.
|
|
||||||
|
|
||||||
## Musical alarms
|
|
||||||
|
|
||||||
- Create one-time, daily or weekday alarms.
|
|
||||||
- Choose a favorite station and a safe internal sound.
|
|
||||||
- Use holidays, skip-next execution and snooze.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Bienvenido a PluriWave
|
|
||||||
|
|
||||||
PluriWave es tu radio mundial premium: emisoras en directo, favoritos organizados, grabaciones, ecualizador y alarmas musicales en una experiencia cuidada.
|
|
||||||
|
|
||||||
## Radio en vivo
|
|
||||||
|
|
||||||
- Buscá emisoras por nombre, país, idioma y calidad.
|
|
||||||
- Explorá emisoras cercanas y descubrí radios nuevas.
|
|
||||||
- Ordená listas por nombre o calidad.
|
|
||||||
|
|
||||||
## Música a tu manera
|
|
||||||
|
|
||||||
- Guardá favoritos y organizalos en grupos.
|
|
||||||
- Ajustá el ecualizador global o los presets por emisora.
|
|
||||||
- Usá el temporizador de sueño con duraciones personalizadas.
|
|
||||||
|
|
||||||
## Grabaciones
|
|
||||||
|
|
||||||
- Grabá radio sin recomprimir el stream original.
|
|
||||||
- Limitá el tamaño máximo del archivo para evitar sustos.
|
|
||||||
- Abrí la carpeta de grabaciones para compartir, mover o editar archivos.
|
|
||||||
|
|
||||||
## Alarmas musicales
|
|
||||||
|
|
||||||
- Creá alarmas únicas, diarias o por días de semana.
|
|
||||||
- Elegí una emisora favorita y un sonido interno seguro.
|
|
||||||
- Usá vacaciones, omitir la próxima ejecución y posponer.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Bienvenue dans PluriWave
|
|
||||||
|
|
||||||
PluriWave est votre radio mondiale premium : stations en direct, favoris organisés, enregistrements, égaliseur et alarmes musicales dans une expérience soignée.
|
|
||||||
|
|
||||||
## Radio en direct
|
|
||||||
|
|
||||||
- Recherchez des stations par nom, pays, langue et qualité.
|
|
||||||
- Explorez les stations proches et découvrez de nouvelles radios.
|
|
||||||
- Triez les listes par nom ou qualité.
|
|
||||||
|
|
||||||
## Votre musique, votre style
|
|
||||||
|
|
||||||
- Enregistrez vos favoris et organisez-les en groupes.
|
|
||||||
- Réglez l'égaliseur global ou des préréglages par station.
|
|
||||||
- Utilisez le minuteur de sommeil avec des durées personnalisées.
|
|
||||||
|
|
||||||
## Enregistrements
|
|
||||||
|
|
||||||
- Enregistrez la radio sans recompresser le flux d'origine.
|
|
||||||
- Limitez la taille maximale des fichiers pour rester serein.
|
|
||||||
- Ouvrez le dossier des enregistrements pour partager, déplacer ou modifier des fichiers.
|
|
||||||
|
|
||||||
## Alarmes musicales
|
|
||||||
|
|
||||||
- Créez des alarmes uniques, quotidiennes ou en semaine.
|
|
||||||
- Choisissez une station favorite et un son interne sûr.
|
|
||||||
- Utilisez les vacances, le saut de la prochaine exécution et le snooze.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# PluriWave में आपका स्वागत है
|
|
||||||
|
|
||||||
PluriWave आपका प्रीमियम विश्व रेडियो है: लाइव स्टेशन, व्यवस्थित पसंदीदा, रिकॉर्डिंग, इक्वलाइज़र और संगीत अलार्म एक सधे हुए अनुभव में।
|
|
||||||
|
|
||||||
## लाइव रेडियो
|
|
||||||
|
|
||||||
- स्टेशन को नाम, देश, भाषा और गुणवत्ता से खोजें।
|
|
||||||
- पास के स्टेशन देखें और नए रेडियो खोजें।
|
|
||||||
- सूचियों को नाम या गुणवत्ता के अनुसार क्रमित करें।
|
|
||||||
|
|
||||||
## संगीत आपके तरीके से
|
|
||||||
|
|
||||||
- पसंदीदा सहेजें और उन्हें समूहों में व्यवस्थित करें।
|
|
||||||
- ग्लोबल इक्वलाइज़र या स्टेशन-विशिष्ट प्रीसेट समायोजित करें।
|
|
||||||
- अपनी पसंद की अवधि वाला स्लीप टाइमर इस्तेमाल करें।
|
|
||||||
|
|
||||||
## रिकॉर्डिंग
|
|
||||||
|
|
||||||
- मूल स्ट्रीम को फिर से कंप्रेस किए बिना रेडियो रिकॉर्ड करें।
|
|
||||||
- सुरक्षित रहने के लिए अधिकतम फ़ाइल आकार सीमित करें।
|
|
||||||
- फ़ाइलें साझा करने, स्थानांतरित करने या संपादित करने के लिए रिकॉर्डिंग फ़ोल्डर खोलें।
|
|
||||||
|
|
||||||
## संगीत अलार्म
|
|
||||||
|
|
||||||
- एक बार, रोज़ाना या कार्यदिवस अलार्म बनाएँ।
|
|
||||||
- पसंदीदा स्टेशन और सुरक्षित आंतरिक ध्वनि चुनें।
|
|
||||||
- छुट्टियाँ, अगला निष्पादन छोड़ना और स्नूज़ का उपयोग करें।
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Selamat datang di PluriWave
|
|
||||||
|
|
||||||
PluriWave adalah radio dunia premium Anda: stasiun langsung, favorit terorganisir, rekaman, equalizer, dan alarm musik dalam pengalaman yang dirancang rapi.
|
|
||||||
|
|
||||||
## Radio langsung
|
|
||||||
|
|
||||||
- Cari stasiun berdasarkan nama, negara, bahasa, dan kualitas.
|
|
||||||
- Jelajahi stasiun terdekat dan temukan radio baru.
|
|
||||||
- Urutkan daftar berdasarkan nama atau kualitas.
|
|
||||||
|
|
||||||
## Musik sesuai cara Anda
|
|
||||||
|
|
||||||
- Simpan favorit dan atur ke dalam grup.
|
|
||||||
- Atur equalizer global atau preset per stasiun.
|
|
||||||
- Gunakan sleep timer dengan durasi kustom.
|
|
||||||
|
|
||||||
## Rekaman
|
|
||||||
|
|
||||||
- Rekam radio tanpa mengompresi ulang stream asli.
|
|
||||||
- Batasi ukuran file maksimum agar tetap aman.
|
|
||||||
- Buka folder rekaman untuk berbagi, memindahkan, atau mengedit file.
|
|
||||||
|
|
||||||
## Alarm musik
|
|
||||||
|
|
||||||
- Buat alarm sekali, harian, atau hari kerja.
|
|
||||||
- Pilih stasiun favorit dan suara internal yang aman.
|
|
||||||
- Gunakan hari libur, lewati eksekusi berikutnya, dan snooze.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Benvenuto in PluriWave
|
|
||||||
|
|
||||||
PluriWave è la tua radio mondiale premium: stazioni live, preferiti organizzati, registrazioni, equalizzatore e sveglie musicali in un'esperienza curata.
|
|
||||||
|
|
||||||
## Radio live
|
|
||||||
|
|
||||||
- Cerca stazioni per nome, paese, lingua e qualità.
|
|
||||||
- Esplora le stazioni vicine e scopri nuove radio.
|
|
||||||
- Ordina le liste per nome o qualità.
|
|
||||||
|
|
||||||
## Musica a modo tuo
|
|
||||||
|
|
||||||
- Salva i preferiti e organizzali in gruppi.
|
|
||||||
- Regola l'equalizzatore globale o i preset per stazione.
|
|
||||||
- Usa il timer di spegnimento con durate personalizzate.
|
|
||||||
|
|
||||||
## Registrazioni
|
|
||||||
|
|
||||||
- Registra la radio senza ricomprimere il flusso originale.
|
|
||||||
- Limita la dimensione massima dei file per stare tranquillo.
|
|
||||||
- Apri la cartella registrazioni per condividere, spostare o modificare i file.
|
|
||||||
|
|
||||||
## Sveglie musicali
|
|
||||||
|
|
||||||
- Crea sveglie singole, giornaliere o nei giorni feriali.
|
|
||||||
- Scegli una stazione preferita e un suono interno sicuro.
|
|
||||||
- Usa ferie, salto della prossima esecuzione e snooze.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# PluriWave へようこそ
|
|
||||||
|
|
||||||
PluriWave は、ライブ局、お気に入り整理、録音、イコライザー、音楽アラームを備えた高品質なワールドラジオです。
|
|
||||||
|
|
||||||
## ライブラジオ
|
|
||||||
|
|
||||||
- 名前、国、言語、音質で局を検索できます。
|
|
||||||
- 近くの局を探して新しいラジオを見つけられます。
|
|
||||||
- リストを名前または音質で並べ替えできます。
|
|
||||||
|
|
||||||
## あなた好みの音楽体験
|
|
||||||
|
|
||||||
- お気に入りを保存してグループで整理できます。
|
|
||||||
- 全体イコライザーや局ごとのプリセットを調整できます。
|
|
||||||
- 時間を指定できるスリープタイマーを使えます。
|
|
||||||
|
|
||||||
## 録音
|
|
||||||
|
|
||||||
- 元のストリームを再圧縮せずに録音できます。
|
|
||||||
- 最大ファイルサイズを制限して安全に使えます。
|
|
||||||
- 録音フォルダーを開いて共有・移動・編集できます。
|
|
||||||
|
|
||||||
## 音楽アラーム
|
|
||||||
|
|
||||||
- 1回のみ、毎日、平日のアラームを作成できます。
|
|
||||||
- お気に入り局と安全な内蔵サウンドを選べます。
|
|
||||||
- 休日設定、次回スキップ、スヌーズに対応しています。
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Bem-vindo ao PluriWave
|
|
||||||
|
|
||||||
PluriWave é seu rádio mundial premium: estações ao vivo, favoritos organizados, gravações, equalizador e alarmes musicais em uma experiência caprichada.
|
|
||||||
|
|
||||||
## Rádio ao vivo
|
|
||||||
|
|
||||||
- Procure estações por nome, país, idioma e qualidade.
|
|
||||||
- Explore estações próximas e descubra novas rádios.
|
|
||||||
- Ordene listas por nome ou qualidade.
|
|
||||||
|
|
||||||
## Música do seu jeito
|
|
||||||
|
|
||||||
- Salve favoritos e organize em grupos.
|
|
||||||
- Ajuste o equalizador global ou presets por estação.
|
|
||||||
- Use o timer de sono com durações personalizadas.
|
|
||||||
|
|
||||||
## Gravações
|
|
||||||
|
|
||||||
- Grave rádio sem recomprimir o stream original.
|
|
||||||
- Limite o tamanho máximo dos arquivos para evitar problemas.
|
|
||||||
- Abra a pasta de gravações para compartilhar, mover ou editar arquivos.
|
|
||||||
|
|
||||||
## Alarmes musicais
|
|
||||||
|
|
||||||
- Crie alarmes únicos, diários ou de dias úteis.
|
|
||||||
- Escolha uma estação favorita e um som interno seguro.
|
|
||||||
- Use feriados, pular próxima execução e soneca.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Добро пожаловать в PluriWave
|
|
||||||
|
|
||||||
PluriWave — ваше премиальное мировое радио: прямые станции, организованные избранные, записи, эквалайзер и музыкальные будильники в продуманном интерфейсе.
|
|
||||||
|
|
||||||
## Прямое радио
|
|
||||||
|
|
||||||
- Ищите станции по названию, стране, языку и качеству.
|
|
||||||
- Изучайте ближайшие станции и открывайте новое радио.
|
|
||||||
- Сортируйте списки по названию или качеству.
|
|
||||||
|
|
||||||
## Музыка по-вашему
|
|
||||||
|
|
||||||
- Сохраняйте избранное и организуйте его по группам.
|
|
||||||
- Настраивайте глобальный эквалайзер или пресеты для станций.
|
|
||||||
- Используйте таймер сна с нужной длительностью.
|
|
||||||
|
|
||||||
## Записи
|
|
||||||
|
|
||||||
- Записывайте радио без повторного сжатия исходного потока.
|
|
||||||
- Ограничивайте максимальный размер файла для безопасности.
|
|
||||||
- Открывайте папку записей, чтобы делиться, перемещать и редактировать файлы.
|
|
||||||
|
|
||||||
## Музыкальные будильники
|
|
||||||
|
|
||||||
- Создавайте разовые, ежедневные или будничные будильники.
|
|
||||||
- Выбирайте любимую станцию и безопасный встроенный звук.
|
|
||||||
- Используйте праздники, пропуск следующего запуска и отложенный сигнал.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# 欢迎使用 PluriWave
|
|
||||||
|
|
||||||
PluriWave 是你的高品质全球电台:直播电台、分组收藏、录音、均衡器和音乐闹钟,体验精致流畅。
|
|
||||||
|
|
||||||
## 直播电台
|
|
||||||
|
|
||||||
- 按名称、国家、语言和音质搜索电台。
|
|
||||||
- 探索附近电台,发现新的广播内容。
|
|
||||||
- 按名称或音质排序列表。
|
|
||||||
|
|
||||||
## 按你的方式听音乐
|
|
||||||
|
|
||||||
- 保存收藏并按分组整理。
|
|
||||||
- 调整全局均衡器或单电台预设。
|
|
||||||
- 使用可自定义时长的睡眠定时器。
|
|
||||||
|
|
||||||
## 录音
|
|
||||||
|
|
||||||
- 录制电台时不重新压缩原始流。
|
|
||||||
- 限制最大文件大小,更安全省心。
|
|
||||||
- 打开录音文件夹以分享、移动或编辑文件。
|
|
||||||
|
|
||||||
## 音乐闹钟
|
|
||||||
|
|
||||||
- 创建一次性、每日或工作日闹钟。
|
|
||||||
- 选择喜爱的电台和安全的内置提示音。
|
|
||||||
- 支持假期、跳过下次执行和贪睡。
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · منبّهات وملفات أكثر موثوقية
|
|
||||||
|
|
||||||
الملخّص: عززنا أساس منبّهات Android وفصلنا بوضوح بين فتح المجلد وتغيير مساره.
|
|
||||||
|
|
||||||
## التحسينات
|
|
||||||
|
|
||||||
- أساس أصلي جديد للمنبّهات مع صوت داخلي آمن.
|
|
||||||
- تشخيص أفضل لأذونات Android الخاصة بالمنبّهات الدقيقة.
|
|
||||||
- المنبّهات التي تُنشأ في الدقيقة نفسها لم تعد تُستبعد بسبب الثواني.
|
|
||||||
- لوحة المنبّهات تميّز بين المنبّهات النشطة والمنبّهات بلا تنفيذ تالٍ صالح.
|
|
||||||
- فتح المجلد يحاول الآن فتح المسار المحفوظ؛ تغيير المسار أصبح منفصلاً.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · আরও নির্ভরযোগ্য অ্যালার্ম ও ফাইল
|
|
||||||
|
|
||||||
সারাংশ: আমরা Android অ্যালার্মের ভিত্তি শক্ত করেছি এবং ফোল্ডার খোলা ও পথ পরিবর্তনকে স্পষ্টভাবে আলাদা করেছি।
|
|
||||||
|
|
||||||
## উন্নতি
|
|
||||||
|
|
||||||
- নিরাপদ অভ্যন্তরীণ সাউন্ডসহ অ্যালার্মের জন্য নতুন নেটিভ ভিত্তি।
|
|
||||||
- Android exact-alarm অনুমতির উন্নত ডায়াগনস্টিক।
|
|
||||||
- একই মিনিটে তৈরি অ্যালার্ম এখন সেকেন্ডের কারণে বাদ পড়ে না।
|
|
||||||
- অ্যালার্ম প্যানেল সক্রিয় অ্যালার্ম ও বৈধ পরের রানবিহীন অ্যালার্ম আলাদা করে।
|
|
||||||
- ফোল্ডার খোলা এখন সংরক্ষিত পথ খোলার চেষ্টা করে; পথ বদল আলাদা করা হয়েছে।
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Zuverlässigere Alarme und Dateien
|
|
||||||
|
|
||||||
Zusammenfassung: Wir haben die Android-Alarmbasis verstärkt und das Öffnen eines Ordners klar vom Ändern seines Pfads getrennt.
|
|
||||||
|
|
||||||
## Verbesserungen
|
|
||||||
|
|
||||||
- Neue native Grundlage für Alarme mit sicherem internem Ton.
|
|
||||||
- Bessere Diagnose der Android-Berechtigung für exakte Alarme.
|
|
||||||
- Alarme, die in derselben Minute erstellt werden, werden wegen Sekunden nicht mehr verworfen.
|
|
||||||
- Das Alarmpanel unterscheidet aktive Alarme von Alarmen ohne gültige nächste Ausführung.
|
|
||||||
- Ordner öffnen versucht jetzt den gespeicherten Pfad zu öffnen; Pfad ändern ist separat.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · More reliable alarms and files
|
|
||||||
|
|
||||||
Summary: we reinforced the Android alarm foundation and clearly separated opening a folder from changing its path.
|
|
||||||
|
|
||||||
## Improvements
|
|
||||||
|
|
||||||
- New native foundation for alarms with a safe internal sound.
|
|
||||||
- Better Android exact-alarm permission diagnostics.
|
|
||||||
- Alarms created in the same minute are no longer discarded because of seconds.
|
|
||||||
- The alarms panel distinguishes active alarms from alarms without a valid next execution.
|
|
||||||
- Open folder now tries to open the saved path; change path is separate.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Alarmas y archivos más fiables
|
|
||||||
|
|
||||||
Resumen: reforzamos la base de alarmas Android y separamos claramente abrir carpeta de cambiar ruta.
|
|
||||||
|
|
||||||
## Mejoras
|
|
||||||
|
|
||||||
- Nueva base nativa para alarmas con sonido interno seguro.
|
|
||||||
- Mejor diagnóstico de permisos Android para alarmas exactas.
|
|
||||||
- Las alarmas creadas en el mismo minuto ya no se descartan por segundos.
|
|
||||||
- El panel de alarmas distingue entre alarmas activas y alarmas sin próxima ejecución válida.
|
|
||||||
- Abrir carpeta ahora intenta abrir la ruta guardada; cambiar ruta queda separado.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Alarmes et fichiers plus fiables
|
|
||||||
|
|
||||||
Résumé : nous avons renforcé la base des alarmes Android et séparé clairement l'ouverture d'un dossier du changement de chemin.
|
|
||||||
|
|
||||||
## Améliorations
|
|
||||||
|
|
||||||
- Nouvelle base native pour les alarmes avec un son interne sûr.
|
|
||||||
- Meilleur diagnostic des permissions Android pour les alarmes exactes.
|
|
||||||
- Les alarmes créées dans la même minute ne sont plus ignorées à cause des secondes.
|
|
||||||
- Le panneau d'alarmes distingue les alarmes actives de celles sans prochaine exécution valide.
|
|
||||||
- Ouvrir le dossier tente désormais d'ouvrir le chemin enregistré ; changer le chemin est séparé.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# v0.1.47 · अधिक भरोसेमंद अलार्म और फ़ाइलें
|
|
||||||
|
|
||||||
सारांश: हमने Android अलार्म की बुनियाद मजबूत की और फ़ोल्डर खोलने को उसका पथ बदलने से स्पष्ट रूप से अलग किया।
|
|
||||||
|
|
||||||
## सुधार
|
|
||||||
|
|
||||||
- सुरक्षित आंतरिक ध्वनि के साथ अलार्म के लिए नई नेटिव बुनियाद।
|
|
||||||
- Android exact-alarm अनुमति के बेहतर निदान।
|
|
||||||
- एक ही मिनट में बने अलार्म अब सेकंड की वजह से हटाए नहीं जाते।
|
|
||||||
- अलार्म पैनल सक्रिय अलार्म और बिना वैध अगली निष्पादन के अलार्म में अंतर करता है।
|
|
||||||
- फ़ोल्डर खोलना अब सहेजा गया पथ खोलने की कोशिश करता है; पथ बदलना अलग है।
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Alarm dan file lebih andal
|
|
||||||
|
|
||||||
Ringkasan: kami memperkuat fondasi alarm Android dan memisahkan dengan jelas antara membuka folder dan mengubah jalurnya.
|
|
||||||
|
|
||||||
## Peningkatan
|
|
||||||
|
|
||||||
- Fondasi native baru untuk alarm dengan suara internal yang aman.
|
|
||||||
- Diagnostik izin exact-alarm Android yang lebih baik.
|
|
||||||
- Alarm yang dibuat pada menit yang sama tidak lagi dibuang karena detik.
|
|
||||||
- Panel alarm membedakan alarm aktif dari alarm tanpa eksekusi berikutnya yang valid.
|
|
||||||
- Buka folder sekarang mencoba membuka jalur tersimpan; ubah jalur dipisahkan.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Allarmi e file più affidabili
|
|
||||||
|
|
||||||
Riepilogo: abbiamo rafforzato la base degli allarmi Android e separato chiaramente l'apertura di una cartella dalla modifica del suo percorso.
|
|
||||||
|
|
||||||
## Miglioramenti
|
|
||||||
|
|
||||||
- Nuova base nativa per gli allarmi con suono interno sicuro.
|
|
||||||
- Diagnostica migliore dei permessi Android per gli allarmi esatti.
|
|
||||||
- Gli allarmi creati nello stesso minuto non vengono più scartati a causa dei secondi.
|
|
||||||
- Il pannello allarmi distingue gli allarmi attivi da quelli senza prossima esecuzione valida.
|
|
||||||
- Apri cartella ora prova ad aprire il percorso salvato; cambia percorso è separato.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · より信頼できるアラームとファイル
|
|
||||||
|
|
||||||
概要: Android のアラーム基盤を強化し、フォルダーを開く操作とパス変更を明確に分離しました。
|
|
||||||
|
|
||||||
## 改善点
|
|
||||||
|
|
||||||
- 安全な内部サウンドを備えた、新しいネイティブアラーム基盤を導入。
|
|
||||||
- Android の正確なアラーム権限診断を改善。
|
|
||||||
- 同じ分に作成したアラームが秒の違いで破棄されなくなりました。
|
|
||||||
- アラームパネルで、有効な次回実行があるアラームとないアラームを区別。
|
|
||||||
- フォルダーを開くは保存済みパスを開くようになり、パス変更は別操作になりました。
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Alarmes e arquivos mais confiáveis
|
|
||||||
|
|
||||||
Resumo: reforçamos a base de alarmes do Android e separamos claramente abrir pasta de mudar caminho.
|
|
||||||
|
|
||||||
## Melhorias
|
|
||||||
|
|
||||||
- Nova base nativa para alarmes com som interno seguro.
|
|
||||||
- Melhor diagnóstico de permissões Android para alarmes exatos.
|
|
||||||
- Alarmes criados no mesmo minuto não são mais descartados por causa dos segundos.
|
|
||||||
- O painel de alarmes distingue alarmes ativos de alarmes sem próxima execução válida.
|
|
||||||
- Abrir pasta agora tenta abrir o caminho salvo; mudar caminho fica separado.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · Более надежные будильники и файлы
|
|
||||||
|
|
||||||
Кратко: мы усилили основу будильников Android и четко разделили открытие папки и изменение её пути.
|
|
||||||
|
|
||||||
## Улучшения
|
|
||||||
|
|
||||||
- Новая нативная основа будильников с безопасным встроенным звуком.
|
|
||||||
- Улучшена диагностика разрешений Android для точных будильников.
|
|
||||||
- Будильники, созданные в ту же минуту, больше не отбрасываются из-за секунд.
|
|
||||||
- Панель будильников различает активные будильники и будильники без валидного следующего запуска.
|
|
||||||
- Открыть папку теперь пытается открыть сохраненный путь; изменение пути вынесено отдельно.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# v0.1.47 · 更可靠的闹钟与文件
|
|
||||||
|
|
||||||
摘要:我们强化了 Android 闹钟基础,并清晰区分了“打开文件夹”和“更改路径”。
|
|
||||||
|
|
||||||
## 改进
|
|
||||||
|
|
||||||
- 闹钟采用新的原生基础,配有安全的内置提示音。
|
|
||||||
- 改进 Android 精确闹钟权限诊断。
|
|
||||||
- 同一分钟创建的闹钟不再因秒数被丢弃。
|
|
||||||
- 闹钟面板可区分活跃闹钟与无有效下次执行的闹钟。
|
|
||||||
- “打开文件夹”现在会尝试打开已保存路径;“更改路径”独立处理。
|
|
||||||
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
@@ -1,5 +0,0 @@
|
|||||||
# PluriWave Night Ocean asset sheet prompt
|
|
||||||
|
|
||||||
Generated with built-in image_gen for the Night Ocean Broadcast redesign.
|
|
||||||
|
|
||||||
Contents: app mark, station fallback artworks, aurora/waveform banner, and navigation glyph assets using teal/amber/cream over navy with no purple/magenta dominance.
|
|
||||||
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 552 KiB |
|
Before Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 382 KiB |
|
Before Width: | Height: | Size: 326 KiB |
|
Before Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 405 KiB |
|
Before Width: | Height: | Size: 552 KiB |
|
Before Width: | Height: | Size: 503 KiB |
|
Before Width: | Height: | Size: 539 KiB |
|
Before Width: | Height: | Size: 519 KiB |
|
Before Width: | Height: | Size: 472 KiB |
|
Before Width: | Height: | Size: 466 KiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 548 KiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
@@ -1,3 +0,0 @@
|
|||||||
PluriWave AAA mockup generated with image_gen.
|
|
||||||
Visual direction: midnight-ocean glass, teal/cyan audio waves, coral sunrise accents, warm gold broadcast particles, accessible high contrast, no purple-dominant palette.
|
|
||||||
Launcher/app icon intentionally preserved.
|
|
||||||
|
Before Width: | Height: | Size: 1.7 MiB |
@@ -1,5 +0,0 @@
|
|||||||
# PluriWave award mockup prompt
|
|
||||||
|
|
||||||
Generated with built-in image_gen as the visual target for the premium redesign.
|
|
||||||
|
|
||||||
Focus: five mobile screens, dark aurora glassmorphism, cyan/violet/magenta gradients, premium iconography, accessible hierarchy, Home/Search/Favorites/Now Playing/Settings.
|
|
||||||
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -1,5 +0,0 @@
|
|||||||
# PluriWave Night Ocean mockup prompt
|
|
||||||
|
|
||||||
Generated with built-in image_gen after user feedback rejecting purple-heavy futuristic UI.
|
|
||||||
|
|
||||||
Direction: Night Ocean Broadcast ? midnight navy and petrol teal base, mint action states, warm amber live/accent, cream text/surfaces, practical radio streaming UX with immediate Now Playing flow.
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Alarmas Android en PluriWave
|
|
||||||
|
|
||||||
PluriWave programa las alarmas con `AlarmManager.setAlarmClock`, porque es el camino Android pensado para despertadores visibles y de alta fiabilidad. Flutter conserva la configuración, la UI, la emisora y los fallbacks; Android se encarga de despertar la app en el momento exacto.
|
|
||||||
|
|
||||||
## Flujo
|
|
||||||
|
|
||||||
1. Flutter calcula la próxima ejecución según tipo, días, vacaciones y omisiones.
|
|
||||||
2. `ServicioAlarmasAndroid` envía la programación al `MethodChannel pluriwave/alarm_scheduler`.
|
|
||||||
3. `AlarmScheduler` registra:
|
|
||||||
- alarma principal con `setAlarmClock`;
|
|
||||||
- preaviso silencioso 30 minutos antes con `setExactAndAllowWhileIdle`.
|
|
||||||
4. `PluriWaveAlarmReceiver` abre la app cuando suena la alarma.
|
|
||||||
5. Flutter muestra `PantallaAlarmaSonando`, intenta reproducir la emisora y activa audio interno si la radio falla o tarda demasiado.
|
|
||||||
|
|
||||||
## Permisos
|
|
||||||
|
|
||||||
- `SCHEDULE_EXACT_ALARM`: necesario en Android 12+ para exactitud.
|
|
||||||
- `POST_NOTIFICATIONS`: necesario en Android 13+ para el preaviso silencioso.
|
|
||||||
- `WAKE_LOCK` y foreground media playback ya están declarados para la reproducción.
|
|
||||||
|
|
||||||
## Fallbacks
|
|
||||||
|
|
||||||
Si la emisora no existe, falla o no empieza a reproducir en unos segundos, la pantalla usa sonidos internos incluidos en `assets/audio/`. Esto evita una alarma silenciosa por problemas de red o de radio.
|
|
||||||
|
|
||||||
## Vacaciones y omisiones
|
|
||||||
|
|
||||||
Las vacaciones se guardan en Flutter. Las alarmas configuradas para pausar en vacaciones saltan automáticamente esos rangos y muestran la próxima fecha válida. El preaviso permite omitir la siguiente ejecución abriendo la app y aplicando la misma lógica de omisión persistente.
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# Arquitectura de alarmas con pantalla apagada
|
|
||||||
|
|
||||||
## Diagnóstico
|
|
||||||
|
|
||||||
El flujo anterior hacía que Android recibiese la alarma con `AlarmManager`, pero el sonido real dependía de que se abriese `MainActivity` y de que Flutter llegase a pintar `PantallaAlarmaSonando`. Con pantalla apagada, Doze o restricciones del fabricante, ese arranque de UI puede retrasarse hasta que el usuario enciende la pantalla.
|
|
||||||
|
|
||||||
## Decisión
|
|
||||||
|
|
||||||
La alarma debe sonar desde Android nativo en cuanto llega `ACTION_FIRE`. Flutter pasa a ser la interfaz de control para detener, posponer y hacer handoff a la radio de la app, pero no el único origen del sonido.
|
|
||||||
|
|
||||||
## Flujo recomendado
|
|
||||||
|
|
||||||
1. `AlarmScheduler` programa la alarma con `setAlarmClock` y fallback exact/inexact.
|
|
||||||
2. `PluriWaveAlarmReceiver` recibe `ACTION_FIRE`.
|
|
||||||
3. El receiver arranca `PluriWaveAlarmService` como foreground service.
|
|
||||||
4. El servicio toma un `PARTIAL_WAKE_LOCK`, muestra notificación foreground y reproduce audio con `USAGE_ALARM`.
|
|
||||||
5. La UI Flutter se abre por full-screen intent si Android lo permite.
|
|
||||||
6. Al detener/posponer desde Flutter, se manda comando nativo para parar el servicio.
|
|
||||||
|
|
||||||
## Referencias
|
|
||||||
|
|
||||||
- Android alarms: https://developer.android.com/develop/background-work/services/alarms
|
|
||||||
- Foreground service restrictions: https://developer.android.com/develop/background-work/services/fgs/restrictions-bg-start
|
|
||||||
- AOSP DeskClock AlarmService: https://android.googlesource.com/platform/packages/apps/DeskClock/+/ac260c0096605526f772af7eec73d6a51dc6de32/src/com/android/deskclock/alarms/AlarmService.java
|
|
||||||
|
|
||||||
## Notas
|
|
||||||
|
|
||||||
- El audio local interno es el fallback más fiable para pantalla apagada.
|
|
||||||
- La radio remota puede fallar por red, DNS, TLS o timeout; por eso debe existir fallback interno.
|
|
||||||
- Si un fabricante bloquea incluso servicios arrancados desde alarma, habrá que guiar al usuario con permisos de batería/autostart.
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# Notas de grabación y visualización real de audio
|
|
||||||
|
|
||||||
Referencia interna: este archivo vive en `docs/` y no está listado en
|
|
||||||
`flutter.assets`, así que no se compila dentro de la aplicación.
|
|
||||||
|
|
||||||
## Decisiones aplicadas
|
|
||||||
|
|
||||||
- La grabación de radio se hace leyendo el stream HTTP original de la emisora y
|
|
||||||
escribiendo sus bytes a disco. No se graba micrófono ni salida del sistema.
|
|
||||||
- La ventaja es que se conserva la calidad original del stream y se evita
|
|
||||||
recomprimir audio.
|
|
||||||
- La forma de onda real se intenta capturar en Android con
|
|
||||||
`android.media.audiofx.Visualizer` usando el `androidAudioSessionId` expuesto
|
|
||||||
por `just_audio`.
|
|
||||||
- Si Android deniega permisos o el dispositivo no permite capturar esa sesión,
|
|
||||||
la UI cae al visualizador animado anterior para no bloquear el reproductor.
|
|
||||||
|
|
||||||
## Fuentes consultadas
|
|
||||||
|
|
||||||
- `just_audio` expone `androidAudioSessionIdStream` para enlazar efectos o
|
|
||||||
visualizadores Android a la sesión activa:
|
|
||||||
https://pub.dev/packages/just_audio/versions/0.10.4
|
|
||||||
- Android `Visualizer` permite capturar waveform de contenido en reproducción y
|
|
||||||
requiere permiso `RECORD_AUDIO`:
|
|
||||||
https://www.android-doc.com/reference/android/media/audiofx/Visualizer.html
|
|
||||||
- Radio Browser permite ordenar búsquedas por `bitrate` y expone campos
|
|
||||||
`codec`/`bitrate`:
|
|
||||||
https://stations.radioss.app/
|
|
||||||
- El paquete `audio_visualizer` existe, pero se descartó como dependencia
|
|
||||||
inmediata porque duplicaría reproducción con su propio player; PluriWave ya
|
|
||||||
usa `audio_service` + `just_audio` y acabamos de estabilizar ese flujo:
|
|
||||||
https://pub.dev/packages/audio_visualizer
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# Notas de reproducción de radio con just_audio/audio_service
|
|
||||||
|
|
||||||
Referencia interna para futuras correcciones del reproductor de PluriWave. Este archivo está en `docs/` y no se incluye en `flutter.assets`, por lo que no compila dentro de la app.
|
|
||||||
|
|
||||||
## Hallazgos útiles
|
|
||||||
|
|
||||||
- `AudioPlayer.play()` completa cuando la reproducción termina, se pausa o se detiene. En radio en vivo no representa simplemente “ya empezó a sonar”.
|
|
||||||
- Las versiones antiguas de PluriWave que sí cambiaban de emisora usaban el flujo simple de `audio_service` + `just_audio`: `stop() -> setUrl() -> play()` dentro de `playMediaItem`.
|
|
||||||
- La regresión apareció cuando mezclamos dos responsabilidades: usar `handler.emisoraActual` como estado técnico de audio y también como estado visual inmediato para mostrar el mini reproductor.
|
|
||||||
- El logcat de 2026-05-21 mostró la media session de PluriWave atascada en `CONNECTING` sin `PlayerException`, con metadata de la emisora anterior (`Track FM`). Eso apunta a un player/ExoPlayer reutilizado que queda colgado entre `stop/setUrl/play`, no a un error HTTP visible.
|
|
||||||
|
|
||||||
## Decisión aplicada en PluriWave
|
|
||||||
|
|
||||||
- Mantener la selección visual inmediata en `EstadoRadio` mediante una emisora seleccionada propia, separada del `emisoraActual` interno del handler.
|
|
||||||
- No usar `setAudioSource(..., preload: false)` como reemplazo de `setUrl(...)`: en esta app rompió incluso la primera conexión.
|
|
||||||
- No esperar `play()` como operación de finalización para radio en vivo.
|
|
||||||
- Al cambiar emisora, recrear el `AudioPlayer`/ExoPlayer para matar completamente la reproducción anterior antes de `setUrl(...)`.
|
|
||||||
- Proteger `EstadoRadio.reproducir` con revisión para que una operación vieja no aplique presets/clicks encima de una nueva.
|
|
||||||
|
|
||||||
## Intentos descartados
|
|
||||||
|
|
||||||
- `setAudioSource(..., preload: false)`: teóricamente razonable, pero en PluriWave rompió la primera conexión.
|
|
||||||
- Hacer que el handler publique `emisoraActual` antes de que el flujo histórico de audio avance: arregla el mini reproductor, pero cambia la semántica que tenían las versiones viejas.
|
|
||||||
- Reutilizar siempre el mismo `AudioPlayer` con `stop()`: logcat mostró estado `CONNECTING` persistente sin excepción al cambiar/reintentar.
|
|
||||||
|
|
||||||
## Fuentes consultadas
|
|
||||||
|
|
||||||
- just_audio `AudioPlayer.play()` API: https://pub.dev/documentation/just_audio/latest/just_audio/AudioPlayer/play.html
|
|
||||||
- just_audio `AudioPlayer` API general: https://pub.dev/documentation/just_audio/latest/just_audio/AudioPlayer-class.html
|
|
||||||
- Ejemplo de radio en vivo de just_audio: https://gist.github.com/scysys/7f700cd49f09ba788021504e8d3477aa
|
|
||||||
- Discusión sobre cambiar fuente con audio_service + just_audio: https://stackoverflow.com/questions/70526156/changing-audio-source-in-audio-service-and-just-audio-flutter
|
|
||||||
@@ -66,7 +66,5 @@
|
|||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
|
||||||
<string>PluriWave usa tu ubicacion aproximada para sugerirte emisoras cercanas.</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
arb-dir: lib/l10n
|
|
||||||
template-arb-file: app_es.arb
|
|
||||||
output-localization-file: app_localizations.dart
|
|
||||||
output-class: AppLocalizations
|
|
||||||
output-dir: lib/l10n/gen
|
|
||||||
nullable-getter: false
|
|
||||||
@@ -1,50 +1,50 @@
|
|||||||
import 'dart:async';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'estado/estado_radio.dart';
|
import 'estado/estado_radio.dart';
|
||||||
import 'estado/estado_alarmas.dart';
|
|
||||||
import 'estado/estado_idioma.dart';
|
|
||||||
import 'l10n/gen/app_localizations.dart';
|
|
||||||
import 'modelos/alarma_musical.dart';
|
|
||||||
import 'pantallas/pantalla_alarmas.dart';
|
|
||||||
import 'pantallas/pantalla_alarma_sonando.dart';
|
|
||||||
import 'pantallas/pantalla_inicio.dart';
|
import 'pantallas/pantalla_inicio.dart';
|
||||||
import 'pantallas/pantalla_buscar.dart';
|
import 'pantallas/pantalla_buscar.dart';
|
||||||
import 'pantallas/pantalla_favoritos.dart';
|
import 'pantallas/pantalla_favoritos.dart';
|
||||||
import 'pantallas/pantalla_ajustes.dart';
|
import 'pantallas/pantalla_ajustes.dart';
|
||||||
import 'tema/pluriwave_theme.dart';
|
import 'widgets/mini_reproductor.dart';
|
||||||
import 'widgets/pluri_bottom_navigation.dart';
|
|
||||||
import 'widgets/pluri_icon.dart';
|
|
||||||
import 'widgets/pluri_layout.dart';
|
|
||||||
import 'widgets/pluri_onboarding_dialog.dart';
|
|
||||||
import 'widgets/pluri_wave_scaffold.dart';
|
|
||||||
import 'package:pluriwave/widgets/mini_reproductor.dart';
|
|
||||||
import 'servicios/servicio_alarmas_android.dart';
|
|
||||||
|
|
||||||
class PluriWaveApp extends StatelessWidget {
|
class PluriWaveApp extends StatelessWidget {
|
||||||
const PluriWaveApp({super.key});
|
const PluriWaveApp({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MultiProvider(
|
return ChangeNotifierProvider(
|
||||||
providers: [
|
create: (_) => EstadoRadio(),
|
||||||
ChangeNotifierProvider(create: (_) => EstadoRadio()),
|
child: MaterialApp(
|
||||||
ChangeNotifierProvider(create: (_) => EstadoAlarmas()),
|
title: 'PluriWave',
|
||||||
ChangeNotifierProvider(create: (_) => EstadoIdioma()),
|
debugShowCheckedModeBanner: false,
|
||||||
],
|
theme: _buildTheme(Brightness.dark),
|
||||||
child: Consumer<EstadoIdioma>(
|
darkTheme: _buildTheme(Brightness.dark),
|
||||||
builder:
|
themeMode: ThemeMode.dark,
|
||||||
(context, estadoIdioma, _) => MaterialApp(
|
home: const _PaginaPrincipal(),
|
||||||
title: 'PluriWave',
|
),
|
||||||
debugShowCheckedModeBanner: false,
|
);
|
||||||
theme: PluriWaveTheme.dark(),
|
}
|
||||||
darkTheme: PluriWaveTheme.dark(),
|
|
||||||
themeMode: ThemeMode.dark,
|
ThemeData _buildTheme(Brightness brightness) {
|
||||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
final colorScheme = ColorScheme.fromSeed(
|
||||||
supportedLocales: AppLocalizations.supportedLocales,
|
seedColor: const Color(0xFF6750A4),
|
||||||
locale: estadoIdioma.localeSeleccionado,
|
brightness: brightness,
|
||||||
home: const _PaginaPrincipal(),
|
);
|
||||||
),
|
return ThemeData(
|
||||||
|
useMaterial3: true,
|
||||||
|
colorScheme: colorScheme,
|
||||||
|
textTheme: GoogleFonts.interTextTheme(
|
||||||
|
ThemeData(brightness: brightness).textTheme,
|
||||||
|
),
|
||||||
|
cardTheme: CardThemeData(
|
||||||
|
elevation: 0,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
|
color: colorScheme.surfaceContainerLow,
|
||||||
|
),
|
||||||
|
snackBarTheme: SnackBarThemeData(
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -59,480 +59,138 @@ class _PaginaPrincipal extends StatefulWidget {
|
|||||||
|
|
||||||
class _PaginaPrincipalState extends State<_PaginaPrincipal> {
|
class _PaginaPrincipalState extends State<_PaginaPrincipal> {
|
||||||
int _indice = 0;
|
int _indice = 0;
|
||||||
StreamSubscription<String>? _errorSubscription;
|
|
||||||
StreamSubscription<EventoAlarmaAndroid>? _alarmaSubscription;
|
|
||||||
StreamSubscription<AlarmaMusical>? _alarmaVencidaSubscription;
|
|
||||||
EstadoRadio? _estadoSuscrito;
|
|
||||||
bool _alarmaInicialProcesada = false;
|
|
||||||
bool _alarmaSonandoActiva = false;
|
|
||||||
bool _onboardingInicialSolicitado = false;
|
|
||||||
String? _alarmaSonandoId;
|
|
||||||
|
|
||||||
static const _paginas = [
|
static const _paginas = [
|
||||||
PantallaInicio(),
|
PantallaInicio(),
|
||||||
PantallaBuscar(),
|
PantallaBuscar(),
|
||||||
PantallaFavoritos(),
|
PantallaFavoritos(),
|
||||||
PantallaAlarmas(),
|
|
||||||
PantallaAjustes(),
|
PantallaAjustes(),
|
||||||
];
|
];
|
||||||
|
|
||||||
List<PluriNavItem> _navItems(AppLocalizations l10n) => [
|
static const _destinos = [
|
||||||
PluriNavItem(glyph: PluriIconGlyph.home, label: l10n.navHome),
|
NavigationDestination(
|
||||||
PluriNavItem(glyph: PluriIconGlyph.search, label: l10n.navSearch),
|
icon: Icon(Icons.home_outlined),
|
||||||
PluriNavItem(glyph: PluriIconGlyph.favorites, label: l10n.navFavorites),
|
selectedIcon: Icon(Icons.home),
|
||||||
PluriNavItem(glyph: PluriIconGlyph.alarm, label: l10n.navAlarms),
|
label: 'Inicio',
|
||||||
PluriNavItem(glyph: PluriIconGlyph.settings, label: l10n.navSettings),
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.search_outlined),
|
||||||
|
selectedIcon: Icon(Icons.search),
|
||||||
|
label: 'Buscar',
|
||||||
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.favorite_outline),
|
||||||
|
selectedIcon: Icon(Icons.favorite),
|
||||||
|
label: 'Favoritos',
|
||||||
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
icon: Icon(Icons.settings_outlined),
|
||||||
|
selectedIcon: Icon(Icons.settings),
|
||||||
|
label: 'Ajustes',
|
||||||
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
super.didChangeDependencies();
|
super.didChangeDependencies();
|
||||||
final estado = context.read<EstadoRadio>();
|
context.read<EstadoRadio>().errorStream.listen((msg) {
|
||||||
if (identical(_estadoSuscrito, estado) && _errorSubscription != null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_errorSubscription?.cancel();
|
|
||||||
_estadoSuscrito = estado;
|
|
||||||
_errorSubscription = estado.errorStream.listen((msg) {
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(msg),
|
content: Text(msg),
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
action: SnackBarAction(
|
action: SnackBarAction(label: 'OK', onPressed: () {}),
|
||||||
label: AppLocalizations.of(context).actionOk,
|
|
||||||
onPressed: () {},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
final alarmas = context.read<EstadoAlarmas>();
|
|
||||||
_alarmaSubscription ??= alarmas.android.eventosAlarma.listen((evento) {
|
|
||||||
if (!mounted) return;
|
|
||||||
_abrirAlarmaSonando(evento);
|
|
||||||
});
|
|
||||||
_alarmaVencidaSubscription ??= alarmas.alarmasVencidasStream.listen((
|
|
||||||
alarma,
|
|
||||||
) {
|
|
||||||
if (!mounted) return;
|
|
||||||
_abrirAlarmaDirecta(alarma);
|
|
||||||
});
|
|
||||||
if (!_alarmaInicialProcesada) {
|
|
||||||
_alarmaInicialProcesada = true;
|
|
||||||
unawaited(_procesarAlarmaInicial(alarmas));
|
|
||||||
}
|
|
||||||
if (!_onboardingInicialSolicitado) {
|
|
||||||
_onboardingInicialSolicitado = true;
|
|
||||||
unawaited(_mostrarOnboardingInicial());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_errorSubscription?.cancel();
|
|
||||||
_alarmaSubscription?.cancel();
|
|
||||||
_alarmaVencidaSubscription?.cancel();
|
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final l10n = AppLocalizations.of(context);
|
return Scaffold(
|
||||||
|
appBar: _indice == 3
|
||||||
return PluriWaveScaffold(
|
? null // PantallaAjustes tiene su propio AppBar
|
||||||
appBar: AppBar(
|
: AppBar(
|
||||||
title: Text(l10n.appTitle),
|
title: const Text('PluriWave'),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.bedtime_outlined),
|
icon: const Icon(Icons.bedtime_outlined),
|
||||||
tooltip: l10n.sleepTimer,
|
tooltip: 'Timer de sueño',
|
||||||
onPressed: () => _mostrarTimerDialog(context),
|
onPressed: () => _mostrarTimerDialog(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: _paginas[_indice],
|
||||||
|
bottomNavigationBar: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const MiniReproductor(),
|
||||||
|
NavigationBar(
|
||||||
|
selectedIndex: _indice,
|
||||||
|
onDestinationSelected: (i) => setState(() => _indice = i),
|
||||||
|
destinations: _destinos,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
);
|
||||||
top: false,
|
}
|
||||||
child: AnimatedSwitcher(
|
|
||||||
duration: context.pluriMotion.normal,
|
void _mostrarTimerDialog(BuildContext context) {
|
||||||
switchInCurve: Curves.easeOutCubic,
|
final estado = context.read<EstadoRadio>();
|
||||||
switchOutCurve: Curves.easeInCubic,
|
showModalBottomSheet(
|
||||||
transitionBuilder:
|
context: context,
|
||||||
(child, animation) => FadeTransition(
|
builder: (ctx) => SafeArea(
|
||||||
opacity: animation,
|
|
||||||
child: SlideTransition(
|
|
||||||
position: Tween<Offset>(
|
|
||||||
begin: const Offset(0.035, 0),
|
|
||||||
end: Offset.zero,
|
|
||||||
).animate(animation),
|
|
||||||
child: child,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: KeyedSubtree(
|
|
||||||
key: ValueKey<int>(_indice),
|
|
||||||
child: _paginas[_indice],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
bottomNavigationBar: SafeArea(
|
|
||||||
top: false,
|
|
||||||
minimum: const EdgeInsets.only(bottom: PluriLayout.compactGap),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const MiniReproductor(),
|
Text('Timer de sueño', style: Theme.of(ctx).textTheme.titleLarge),
|
||||||
PluriBottomNavigation(
|
const SizedBox(height: 16),
|
||||||
items: _navItems(l10n),
|
if (estado.timer.activo)
|
||||||
selectedIndex: _indice,
|
StreamBuilder<Duration>(
|
||||||
onSelected: (i) => setState(() => _indice = i),
|
stream: estado.timer.tiempoRestanteStream,
|
||||||
),
|
builder: (ctx, snap) {
|
||||||
|
final t = snap.data ?? Duration.zero;
|
||||||
|
final h = t.inHours;
|
||||||
|
final m = t.inMinutes.remainder(60).toString().padLeft(2, '0');
|
||||||
|
final s = t.inSeconds.remainder(60).toString().padLeft(2, '0');
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'${h > 0 ? "${h}h " : ""}${m}m ${s}s',
|
||||||
|
style: Theme.of(ctx).textTheme.headlineMedium,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
FilledButton.tonal(
|
||||||
|
onPressed: () {
|
||||||
|
estado.cancelarTimer();
|
||||||
|
Navigator.pop(ctx);
|
||||||
|
},
|
||||||
|
child: const Text('Cancelar timer'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
else
|
||||||
|
Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
children: [15, 30, 60, 90]
|
||||||
|
.map((min) => ActionChip(
|
||||||
|
label: Text('$min min'),
|
||||||
|
onPressed: () {
|
||||||
|
estado.iniciarTimer(min);
|
||||||
|
Navigator.pop(ctx);
|
||||||
|
},
|
||||||
|
))
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _procesarAlarmaInicial(EstadoAlarmas alarmas) async {
|
|
||||||
final evento = await alarmas.android.obtenerEventoInicial();
|
|
||||||
if (evento != null && mounted) {
|
|
||||||
await _abrirAlarmaSonando(evento);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _mostrarOnboardingInicial() async {
|
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 900));
|
|
||||||
if (!mounted || _alarmaSonandoActiva) return;
|
|
||||||
await PluriOnboardingDialog.mostrarSiProcede(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _abrirAlarmaSonando(EventoAlarmaAndroid evento) async {
|
|
||||||
final estado = context.read<EstadoAlarmas>();
|
|
||||||
if (estado.alarmas.isEmpty) {
|
|
||||||
await estado.cargarPersistidasSinRecalcular();
|
|
||||||
}
|
|
||||||
AlarmaMusical? alarma;
|
|
||||||
for (final item in estado.alarmas) {
|
|
||||||
if (item.id == evento.alarmaId) {
|
|
||||||
alarma = item;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (alarma == null || !mounted) {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] evento sin alarma persistida id=${evento.alarmaId} accion=${evento.accion}',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (evento.accion.endsWith('.SKIP_NEXT')) {
|
|
||||||
await estado.saltarProxima(alarma.id);
|
|
||||||
if (!mounted) return;
|
|
||||||
setState(() => _indice = 3);
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(
|
|
||||||
content: Text(
|
|
||||||
AppLocalizations.of(
|
|
||||||
context,
|
|
||||||
).skipCurrentAlarmExecution(alarma.nombre),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (evento.accion.endsWith('.PRE_NOTICE')) {
|
|
||||||
setState(() => _indice = 3);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await _mostrarAlarmaSonando(alarma);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _abrirAlarmaDirecta(AlarmaMusical alarma) async {
|
|
||||||
await _mostrarAlarmaSonando(alarma);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _mostrarAlarmaSonando(AlarmaMusical alarma) async {
|
|
||||||
final alarmas = context.read<EstadoAlarmas>();
|
|
||||||
alarmas.marcarEjecucionGestionada(alarma);
|
|
||||||
|
|
||||||
if (_alarmaSonandoActiva) {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] alarma ignorada porque ya hay una activa id=${alarma.id} activa=$_alarmaSonandoId',
|
|
||||||
);
|
|
||||||
await alarmas.android.ocultarNotificacionAlarma(alarma.id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_alarmaSonandoActiva = true;
|
|
||||||
_alarmaSonandoId = alarma.id;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await alarmas.android.detenerSonidoNativo(alarma.id);
|
|
||||||
await _prearrancarAudioAlarma(alarma);
|
|
||||||
if (!mounted) return;
|
|
||||||
await Navigator.of(context).push(
|
|
||||||
MaterialPageRoute<void>(
|
|
||||||
builder:
|
|
||||||
(_) => PantallaAlarmaSonando(
|
|
||||||
alarma: alarma,
|
|
||||||
audioPrearrancado: alarma.emisora != null,
|
|
||||||
),
|
|
||||||
fullscreenDialog: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} finally {
|
|
||||||
if (_alarmaSonandoId == alarma.id) {
|
|
||||||
_alarmaSonandoActiva = false;
|
|
||||||
_alarmaSonandoId = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _prearrancarAudioAlarma(AlarmaMusical alarma) async {
|
|
||||||
final emisora = alarma.emisora;
|
|
||||||
if (emisora == null) return;
|
|
||||||
final radio = context.read<EstadoRadio>();
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] prearrancar emisora alarma id=${alarma.id} emisora=${emisora.nombre}',
|
|
||||||
);
|
|
||||||
await radio.audio.setVolumen(alarma.volumen.clamp(0.0, 1.0));
|
|
||||||
unawaited(radio.reproducir(emisora));
|
|
||||||
}
|
|
||||||
|
|
||||||
void _mostrarTimerDialog(BuildContext context) {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
showDragHandle: true,
|
|
||||||
builder:
|
|
||||||
(ctx) => Consumer<EstadoRadio>(
|
|
||||||
builder:
|
|
||||||
(ctx, estado, _) => SafeArea(
|
|
||||||
child: Padding(
|
|
||||||
padding: PluriLayout.sheetPadding,
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
AppLocalizations.of(ctx).sleepTimer,
|
|
||||||
style: Theme.of(ctx).textTheme.titleLarge,
|
|
||||||
),
|
|
||||||
const SizedBox(height: PluriLayout.sectionGap),
|
|
||||||
Text(
|
|
||||||
AppLocalizations.of(ctx).sleepTimerDescription,
|
|
||||||
style: Theme.of(ctx).textTheme.bodySmall,
|
|
||||||
),
|
|
||||||
const SizedBox(height: PluriLayout.panelGap),
|
|
||||||
if (estado.timer.activo)
|
|
||||||
StreamBuilder<Duration>(
|
|
||||||
stream: estado.timer.tiempoRestanteStream,
|
|
||||||
builder: (ctx, snap) {
|
|
||||||
final restante =
|
|
||||||
snap.data ?? estado.timer.tiempoRestante;
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
_formatearDuracionTimer(restante),
|
|
||||||
style:
|
|
||||||
Theme.of(ctx).textTheme.headlineMedium,
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: PluriLayout.compactGap,
|
|
||||||
),
|
|
||||||
FilledButton.tonal(
|
|
||||||
onPressed: () {
|
|
||||||
estado.cancelarTimer();
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
AppLocalizations.of(ctx).cancelTimer,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
else
|
|
||||||
Wrap(
|
|
||||||
spacing: PluriLayout.compactGap,
|
|
||||||
runSpacing: PluriLayout.compactGap,
|
|
||||||
children: [
|
|
||||||
for (final segundos
|
|
||||||
in estado.timerSuenoPresetsSegundos)
|
|
||||||
ActionChip(
|
|
||||||
label: Text(
|
|
||||||
_formatearDuracionTimer(
|
|
||||||
Duration(seconds: segundos),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
estado.iniciarTimerDuracion(
|
|
||||||
Duration(seconds: segundos),
|
|
||||||
);
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ActionChip(
|
|
||||||
avatar: const Icon(
|
|
||||||
Icons.tune_rounded,
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
label: Text(
|
|
||||||
AppLocalizations.of(ctx).optionOther,
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
final duracion =
|
|
||||||
await _pedirDuracionPersonalizada(ctx);
|
|
||||||
if (duracion == null || !ctx.mounted) return;
|
|
||||||
estado.iniciarTimerDuracion(duracion);
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Duration?> _pedirDuracionPersonalizada(BuildContext context) {
|
|
||||||
return showModalBottomSheet<Duration>(
|
|
||||||
context: context,
|
|
||||||
isScrollControlled: true,
|
|
||||||
showDragHandle: true,
|
|
||||||
builder: (ctx) => const _TimerPersonalizadoSheet(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String _formatearDuracionTimer(Duration duracion) {
|
|
||||||
final horas = duracion.inHours;
|
|
||||||
final minutos = duracion.inMinutes.remainder(60);
|
|
||||||
final segundos = duracion.inSeconds.remainder(60);
|
|
||||||
if (horas > 0) {
|
|
||||||
return '${horas}h ${minutos.toString().padLeft(2, '0')}m ${segundos.toString().padLeft(2, '0')}s';
|
|
||||||
}
|
|
||||||
if (minutos > 0) {
|
|
||||||
return segundos == 0 ? '$minutos min' : '${minutos}m ${segundos}s';
|
|
||||||
}
|
|
||||||
return '$segundos s';
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TimerPersonalizadoSheet extends StatefulWidget {
|
|
||||||
const _TimerPersonalizadoSheet();
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<_TimerPersonalizadoSheet> createState() =>
|
|
||||||
_TimerPersonalizadoSheetState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TimerPersonalizadoSheetState extends State<_TimerPersonalizadoSheet> {
|
|
||||||
final _horasCtrl = TextEditingController();
|
|
||||||
final _minutosCtrl = TextEditingController(text: '15');
|
|
||||||
final _segundosCtrl = TextEditingController();
|
|
||||||
bool _guardarPreset = true;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_horasCtrl.dispose();
|
|
||||||
_minutosCtrl.dispose();
|
|
||||||
_segundosCtrl.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
int _leer(TextEditingController ctrl) => int.tryParse(ctrl.text.trim()) ?? 0;
|
|
||||||
|
|
||||||
Future<void> _confirmar() async {
|
|
||||||
final duracion = Duration(
|
|
||||||
hours: _leer(_horasCtrl),
|
|
||||||
minutes: _leer(_minutosCtrl),
|
|
||||||
seconds: _leer(_segundosCtrl),
|
|
||||||
);
|
|
||||||
if (duracion <= Duration.zero) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(
|
|
||||||
content: Text(AppLocalizations.of(context).durationGreaterThanZero),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_guardarPreset) {
|
|
||||||
await context.read<EstadoRadio>().agregarTimerSuenoPreset(duracion);
|
|
||||||
}
|
|
||||||
if (mounted) Navigator.pop(context, duracion);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final bottom = MediaQuery.viewInsetsOf(context).bottom;
|
|
||||||
return SafeArea(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.fromLTRB(18, 0, 18, 18 + bottom),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
AppLocalizations.of(context).customDurationTitle,
|
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
|
||||||
),
|
|
||||||
const SizedBox(height: PluriLayout.sectionGap),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: _campoTiempo(
|
|
||||||
_horasCtrl,
|
|
||||||
AppLocalizations.of(context).hoursLabel,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: PluriLayout.compactGap),
|
|
||||||
Expanded(
|
|
||||||
child: _campoTiempo(
|
|
||||||
_minutosCtrl,
|
|
||||||
AppLocalizations.of(context).minutesLabel,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: PluriLayout.compactGap),
|
|
||||||
Expanded(
|
|
||||||
child: _campoTiempo(
|
|
||||||
_segundosCtrl,
|
|
||||||
AppLocalizations.of(context).secondsLabel,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: PluriLayout.compactGap),
|
|
||||||
SwitchListTile.adaptive(
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
title: Text(AppLocalizations.of(context).saveQuickAccess),
|
|
||||||
value: _guardarPreset,
|
|
||||||
onChanged: (value) => setState(() => _guardarPreset = value),
|
|
||||||
),
|
|
||||||
const SizedBox(height: PluriLayout.sectionGap),
|
|
||||||
FilledButton.icon(
|
|
||||||
icon: const Icon(Icons.bedtime_rounded),
|
|
||||||
label: Text(AppLocalizations.of(context).startTimer),
|
|
||||||
onPressed: _confirmar,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _campoTiempo(TextEditingController controller, String label) {
|
|
||||||
return TextField(
|
|
||||||
controller: controller,
|
|
||||||
keyboardType: TextInputType.number,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: label,
|
|
||||||
border: const OutlineInputBorder(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,261 +0,0 @@
|
|||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
import '../modelos/alarma_musical.dart';
|
|
||||||
import '../servicios/servicio_alarmas.dart';
|
|
||||||
import '../servicios/servicio_alarmas_android.dart';
|
|
||||||
|
|
||||||
class EstadoAlarmas extends ChangeNotifier {
|
|
||||||
EstadoAlarmas({
|
|
||||||
ServicioAlarmas? servicio,
|
|
||||||
ServicioAlarmasAndroid? android,
|
|
||||||
bool iniciarAutomaticamente = true,
|
|
||||||
}) : servicio = servicio ?? ServicioAlarmas(),
|
|
||||||
android = android ?? ServicioAlarmasAndroid() {
|
|
||||||
if (iniciarAutomaticamente) {
|
|
||||||
inicializar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final ServicioAlarmas servicio;
|
|
||||||
final ServicioAlarmasAndroid android;
|
|
||||||
|
|
||||||
List<AlarmaMusical> _alarmas = [];
|
|
||||||
List<RangoVacaciones> _vacaciones = [];
|
|
||||||
List<ExcepcionAlarma> _excepciones = [];
|
|
||||||
DiagnosticoAlarmasAndroid? _diagnostico;
|
|
||||||
Timer? _refresco;
|
|
||||||
Timer? _vigilancia;
|
|
||||||
final _alarmasVencidasController =
|
|
||||||
StreamController<AlarmaMusical>.broadcast();
|
|
||||||
final Set<String> _ejecucionesEmitidas = {};
|
|
||||||
static const _margenDisparoLocal = Duration(seconds: 45);
|
|
||||||
bool _cargando = false;
|
|
||||||
String? _error;
|
|
||||||
|
|
||||||
List<AlarmaMusical> get alarmas => List.unmodifiable(_alarmas);
|
|
||||||
List<RangoVacaciones> get vacaciones => List.unmodifiable(_vacaciones);
|
|
||||||
List<ExcepcionAlarma> get excepciones => List.unmodifiable(_excepciones);
|
|
||||||
DiagnosticoAlarmasAndroid? get diagnostico => _diagnostico;
|
|
||||||
bool get cargando => _cargando;
|
|
||||||
String? get error => _error;
|
|
||||||
Stream<AlarmaMusical> get alarmasVencidasStream =>
|
|
||||||
_alarmasVencidasController.stream;
|
|
||||||
|
|
||||||
AlarmaMusical? get proximaAlarma {
|
|
||||||
final candidatas =
|
|
||||||
_alarmas.where((a) => a.activa && a.proximaEjecucion != null).toList()
|
|
||||||
..sort((a, b) => a.proximaEjecucion!.compareTo(b.proximaEjecucion!));
|
|
||||||
return candidatas.isEmpty ? null : candidatas.first;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> inicializar() async {
|
|
||||||
debugPrint('[PluriWave][alarmas] inicializar');
|
|
||||||
_cargando = true;
|
|
||||||
_error = null;
|
|
||||||
notifyListeners();
|
|
||||||
try {
|
|
||||||
final config = await servicio.recalcularTodas();
|
|
||||||
_aplicar(config);
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] cargadas=${_alarmas.length} vacaciones=${_vacaciones.length} excepciones=${_excepciones.length}',
|
|
||||||
);
|
|
||||||
await _sincronizarTodas();
|
|
||||||
await cargarDiagnostico();
|
|
||||||
_activarRefresco();
|
|
||||||
} catch (e) {
|
|
||||||
_error = 'No se pudieron cargar las alarmas: $e';
|
|
||||||
debugPrint('[PluriWave][alarmas] inicializar ERROR $e');
|
|
||||||
} finally {
|
|
||||||
_cargando = false;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> guardarAlarma(AlarmaMusical alarma) async {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] guardar id=${alarma.id} activa=${alarma.activa} hora=${alarma.hora}:${alarma.minuto} tipo=${alarma.tipoProgramacion.name}',
|
|
||||||
);
|
|
||||||
final config = await servicio.guardarAlarma(alarma);
|
|
||||||
_aplicar(config);
|
|
||||||
try {
|
|
||||||
final guardada = _alarmas.firstWhere((a) => a.id == alarma.id);
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] guardada id=${guardada.id} proxima=${guardada.proximaEjecucion?.toIso8601String()}',
|
|
||||||
);
|
|
||||||
await android.programar(guardada);
|
|
||||||
} catch (e) {
|
|
||||||
_error = 'Alarma guardada, pero Android no pudo programarla todavía: $e';
|
|
||||||
}
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> refrescarProgramacion() async {
|
|
||||||
debugPrint('[PluriWave][alarmas] refrescar programacion');
|
|
||||||
final config = await servicio.recalcularTodas();
|
|
||||||
_aplicar(config);
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] proxima tras refrescar=${proximaAlarma?.id} ${proximaAlarma?.proximaEjecucion?.toIso8601String()}',
|
|
||||||
);
|
|
||||||
await _sincronizarTodas();
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> cargarPersistidasSinRecalcular() async {
|
|
||||||
final config = await servicio.cargar();
|
|
||||||
_aplicar(config);
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
void marcarEjecucionGestionada(AlarmaMusical alarma) {
|
|
||||||
final proxima = alarma.proximaEjecucion;
|
|
||||||
if (proxima == null) return;
|
|
||||||
final key = '${alarma.id}:${proxima.millisecondsSinceEpoch}';
|
|
||||||
_ejecucionesEmitidas.add(key);
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] ejecucion gestionada id=${alarma.id} proxima=${proxima.toIso8601String()}',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> eliminarAlarma(String id) async {
|
|
||||||
debugPrint('[PluriWave][alarmas] eliminar id=$id');
|
|
||||||
final config = await servicio.eliminarAlarma(id);
|
|
||||||
_aplicar(config);
|
|
||||||
await android.detenerSonidoNativo(id);
|
|
||||||
await android.cancelar(id);
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> cambiarActiva(AlarmaMusical alarma, bool activa) async {
|
|
||||||
await guardarAlarma(alarma.copyWith(activa: activa));
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> saltarProxima(String alarmaId) async {
|
|
||||||
debugPrint('[PluriWave][alarmas] saltar proxima id=$alarmaId');
|
|
||||||
final config = await servicio.saltarProxima(alarmaId);
|
|
||||||
_aplicar(config);
|
|
||||||
AlarmaMusical? alarma;
|
|
||||||
for (final item in _alarmas) {
|
|
||||||
if (item.id == alarmaId) {
|
|
||||||
alarma = item;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (alarma != null) {
|
|
||||||
await android.programar(alarma);
|
|
||||||
}
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> guardarVacaciones(List<RangoVacaciones> vacaciones) async {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] guardar vacaciones count=${vacaciones.length}',
|
|
||||||
);
|
|
||||||
final config = await servicio.guardarVacaciones(vacaciones);
|
|
||||||
_aplicar(config);
|
|
||||||
await _sincronizarTodas();
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> posponerAlarma(AlarmaMusical alarma, int minutos) async {
|
|
||||||
final proxima = DateTime.now().add(Duration(minutes: minutos));
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] posponer id=${alarma.id} minutos=$minutos proxima=${proxima.toIso8601String()}',
|
|
||||||
);
|
|
||||||
await android.ocultarNotificacionAlarma(alarma.id);
|
|
||||||
await android.programar(alarma.copyWith(proximaEjecucion: proxima));
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> finalizarEjecucion(String alarmaId) async {
|
|
||||||
debugPrint('[PluriWave][alarmas] finalizar ejecucion id=$alarmaId');
|
|
||||||
await android.ocultarNotificacionAlarma(alarmaId);
|
|
||||||
await refrescarProgramacion();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> crearRangoVacaciones(RangoVacaciones rango) async {
|
|
||||||
final nuevos = [..._vacaciones, rango];
|
|
||||||
await guardarVacaciones(nuevos);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> eliminarRangoVacaciones(String id) async {
|
|
||||||
final nuevos = _vacaciones.where((v) => v.id != id).toList();
|
|
||||||
await guardarVacaciones(nuevos);
|
|
||||||
}
|
|
||||||
|
|
||||||
ExcepcionAlarma? ultimaExcepcionPara(String alarmaId) {
|
|
||||||
final candidatas =
|
|
||||||
_excepciones.where((e) => e.alarmaId == alarmaId).toList()
|
|
||||||
..sort((a, b) => b.ejecucion.compareTo(a.ejecucion));
|
|
||||||
return candidatas.isEmpty ? null : candidatas.first;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> cargarDiagnostico() async {
|
|
||||||
try {
|
|
||||||
_diagnostico = await android.diagnostico();
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('[PluriWave][alarmas] diagnostico ERROR $e');
|
|
||||||
_diagnostico = null;
|
|
||||||
}
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _sincronizarTodas() async {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] sincronizar todas count=${_alarmas.length}',
|
|
||||||
);
|
|
||||||
for (final alarma in _alarmas) {
|
|
||||||
await android.programar(alarma);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _aplicar(ConfiguracionAlarmas config) {
|
|
||||||
_alarmas = config.alarmas;
|
|
||||||
_vacaciones = config.vacaciones;
|
|
||||||
_excepciones = config.excepciones;
|
|
||||||
}
|
|
||||||
|
|
||||||
void _activarRefresco() {
|
|
||||||
_refresco?.cancel();
|
|
||||||
_refresco = Timer.periodic(const Duration(minutes: 1), (_) {
|
|
||||||
refrescarProgramacion();
|
|
||||||
});
|
|
||||||
_vigilarAlarmasVencidas();
|
|
||||||
_vigilancia?.cancel();
|
|
||||||
_vigilancia = Timer.periodic(const Duration(seconds: 10), (_) {
|
|
||||||
_vigilarAlarmasVencidas();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void _vigilarAlarmasVencidas() {
|
|
||||||
final ahora = DateTime.now();
|
|
||||||
for (final alarma in _alarmas) {
|
|
||||||
final proxima = alarma.proximaEjecucion;
|
|
||||||
if (!alarma.activa || proxima == null) continue;
|
|
||||||
if (proxima.isAfter(ahora)) continue;
|
|
||||||
final key = '${alarma.id}:${proxima.millisecondsSinceEpoch}';
|
|
||||||
final retraso = ahora.difference(proxima);
|
|
||||||
if (retraso > _margenDisparoLocal) {
|
|
||||||
_ejecucionesEmitidas.add(key);
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] vencida local ignorada por antigua id=${alarma.id} proxima=${proxima.toIso8601String()} retraso=${retraso.inSeconds}s',
|
|
||||||
);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (_ejecucionesEmitidas.add(key)) {
|
|
||||||
debugPrint(
|
|
||||||
'[PluriWave][alarmas] vencida local id=${alarma.id} proxima=${proxima.toIso8601String()}',
|
|
||||||
);
|
|
||||||
_alarmasVencidasController.add(alarma);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_refresco?.cancel();
|
|
||||||
_vigilancia?.cancel();
|
|
||||||
_alarmasVencidasController.close();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
|
|
||||||
class EstadoIdioma extends ChangeNotifier {
|
|
||||||
EstadoIdioma({SharedPreferences? sharedPreferences})
|
|
||||||
: _sharedPreferences = sharedPreferences {
|
|
||||||
_cargar();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const String _keyLocale = 'idioma_manual_v1';
|
|
||||||
|
|
||||||
final SharedPreferences? _sharedPreferences;
|
|
||||||
|
|
||||||
Locale? _localeSeleccionado;
|
|
||||||
|
|
||||||
Locale? get localeSeleccionado => _localeSeleccionado;
|
|
||||||
bool get usaSistema => _localeSeleccionado == null;
|
|
||||||
|
|
||||||
Future<void> seleccionarSistema() async {
|
|
||||||
_localeSeleccionado = null;
|
|
||||||
notifyListeners();
|
|
||||||
final prefs = await _resolverPrefs();
|
|
||||||
await prefs.remove(_keyLocale);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> seleccionarLocale(Locale locale) async {
|
|
||||||
final tag = _serializarLocale(locale);
|
|
||||||
_localeSeleccionado = locale;
|
|
||||||
notifyListeners();
|
|
||||||
final prefs = await _resolverPrefs();
|
|
||||||
await prefs.setString(_keyLocale, tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _cargar() async {
|
|
||||||
final prefs = await _resolverPrefs();
|
|
||||||
final localeGuardado = prefs.getString(_keyLocale);
|
|
||||||
_localeSeleccionado = _parsearLocale(localeGuardado);
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<SharedPreferences> _resolverPrefs() async {
|
|
||||||
return _sharedPreferences ?? SharedPreferences.getInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
Locale? _parsearLocale(String? value) {
|
|
||||||
if (value == null || value.trim().isEmpty) return null;
|
|
||||||
final partes = value.split('_');
|
|
||||||
final languageCode = partes.first;
|
|
||||||
if (languageCode.isEmpty) return null;
|
|
||||||
final countryCode = partes.length > 1 && partes[1].isNotEmpty
|
|
||||||
? partes[1]
|
|
||||||
: null;
|
|
||||||
return Locale.fromSubtags(
|
|
||||||
languageCode: languageCode,
|
|
||||||
countryCode: countryCode,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String _serializarLocale(Locale locale) {
|
|
||||||
final countryCode = locale.countryCode;
|
|
||||||
if (countryCode == null || countryCode.isEmpty) {
|
|
||||||
return locale.languageCode;
|
|
||||||
}
|
|
||||||
return '${locale.languageCode}_$countryCode';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"@@locale": "ar",
|
|
||||||
"appTitle": "PluriWave",
|
|
||||||
"navHome": "Home",
|
|
||||||
"navSearch": "Search",
|
|
||||||
"navFavorites": "Favorites",
|
|
||||||
"navAlarms": "Alarms",
|
|
||||||
"navSettings": "Settings",
|
|
||||||
"actionOk": "OK",
|
|
||||||
"sleepTimer": "Sleep timer",
|
|
||||||
"sleepTimerDescription": "Smooth radio shutdown with an exact countdown.",
|
|
||||||
"cancelTimer": "Cancel timer",
|
|
||||||
"optionOther": "Other",
|
|
||||||
"customDurationTitle": "Custom duration",
|
|
||||||
"durationGreaterThanZero": "Choose a duration greater than zero.",
|
|
||||||
"hoursLabel": "Hours",
|
|
||||||
"minutesLabel": "Minutes",
|
|
||||||
"secondsLabel": "Seconds",
|
|
||||||
"saveQuickAccess": "Save as quick access",
|
|
||||||
"startTimer": "Start timer",
|
|
||||||
"skipCurrentAlarmExecution": "Skipped this execution of {alarmName}.",
|
|
||||||
"@skipCurrentAlarmExecution": {
|
|
||||||
"placeholders": {
|
|
||||||
"alarmName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settingsTitle": "Settings",
|
|
||||||
"settingsSubtitle": "Fine-grained sound control, backups, and custom stations.",
|
|
||||||
"languageSectionTitle": "Language",
|
|
||||||
"languageSectionDescription": "Choose how the app language is displayed.",
|
|
||||||
"languageSystemDefault": "System",
|
|
||||||
"languageSpanish": "Spanish",
|
|
||||||
"languageEnglish": "English",
|
|
||||||
"languageUpdated": "Language updated: {languageName}",
|
|
||||||
"@languageUpdated": {
|
|
||||||
"placeholders": {
|
|
||||||
"languageName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"languageUpdatedSystem": "Language updated: System",
|
|
||||||
"timerSectionTitle": "Sleep timer",
|
|
||||||
"timerSectionAdd": "Add",
|
|
||||||
"timerSectionDescription": "Customize the quick presets shown when automatically stopping the radio.",
|
|
||||||
"timerSectionRestoreRecommended": "Restore recommended times",
|
|
||||||
"newQuickAccessTitle": "New quick access",
|
|
||||||
"saveQuickAccessButton": "Save quick access",
|
|
||||||
"settingsSafeStatus": "Safe",
|
|
||||||
"recordingsSectionTitle": "Recordings",
|
|
||||||
"recordingsFolderDialogTitle": "Select recordings folder",
|
|
||||||
"recordingsPathUpdated": "Recording path updated",
|
|
||||||
"recordingsPathSaveError": "Could not save the path: {error}",
|
|
||||||
"recordingsDefaultFolderRestored": "The internal default folder will be used",
|
|
||||||
"recordingsFolderTitle": "Recordings folder",
|
|
||||||
"recordingsPathCalculating": "Calculating path...",
|
|
||||||
"recordingsChangePath": "Change path",
|
|
||||||
"recordingsUseDefaultPath": "Use default path",
|
|
||||||
"recordingsOriginalStreamHint": "The radio is saved from the original stream, without recompressing.",
|
|
||||||
"equalizerActive": "Active",
|
|
||||||
"equalizerDisabled": "Disabled",
|
|
||||||
"equalizerEnable": "Enable equalizer",
|
|
||||||
"equalizerRealtimeSubtitle": "Changes are applied in real time to the current station.",
|
|
||||||
"equalizerPendingSubtitle": "Changes are saved and will apply when Android enables the effect.",
|
|
||||||
"equalizerPerStationTitle": "Use custom EQ for this favorite",
|
|
||||||
"equalizerPerStationActive": "Active for {stationName}",
|
|
||||||
"equalizerPerStationMain": "Using main EQ for {stationName}",
|
|
||||||
"preferredStationTitle": "Preferred station",
|
|
||||||
"preferredStationDescription": "Preselected for new alarms and available for quick playback.",
|
|
||||||
"preferredStationNoStationsTitle": "No stations available yet",
|
|
||||||
"preferredStationNoStationsSubtitle": "Save favorites or load stations to choose a preferred one.",
|
|
||||||
"preferredStationAutomaticFallback": "Automatic fallback",
|
|
||||||
"preferredStationDefaultFavorite": "Default favorite",
|
|
||||||
"preferredStationCurrent": "Current preferred: {stationName}",
|
|
||||||
"preferredStationAutoUsing": "No favorites: automatically using {stationName}",
|
|
||||||
"preferredStationPlay": "Play preferred",
|
|
||||||
"customStationsTitle": "Custom stations",
|
|
||||||
"customStationsAdd": "Add",
|
|
||||||
"customStationsEmpty": "No custom stations.",
|
|
||||||
"playAction": "Play",
|
|
||||||
"deleteAction": "Delete",
|
|
||||||
"addStationTitle": "Add station",
|
|
||||||
"stationNameLabel": "Name *",
|
|
||||||
"requiredField": "Required field",
|
|
||||||
"streamUrlLabel": "Stream URL *",
|
|
||||||
"invalidUrl": "Invalid URL",
|
|
||||||
"countryOptionalLabel": "Country (optional)",
|
|
||||||
"saveStation": "Save station",
|
|
||||||
"backupSectionTitle": "Backup",
|
|
||||||
"backupExportTitle": "Export configuration",
|
|
||||||
"backupExportSubtitle": "Favorites, custom stations, and EQ presets",
|
|
||||||
"backupImportTitle": "Import configuration",
|
|
||||||
"backupImportSubtitle": "Restore from a backup file",
|
|
||||||
"backupShareSubject": "PluriWave — backup",
|
|
||||||
"backupShareText": "PluriWave configuration exported on {date}",
|
|
||||||
"backupExportError": "Export error: {error}",
|
|
||||||
"backupImportConfirmMessage": "This will add favorites, stations, and presets from the file. Continue?",
|
|
||||||
"backupImportSuccess": "Configuration imported successfully",
|
|
||||||
"backupImportError": "Import error: {error}",
|
|
||||||
"appVersionLoading": "Loading version...",
|
|
||||||
"appVersionSubtitle": "{version} - World radio",
|
|
||||||
"savedFavoritesTitle": "Saved favorites",
|
|
||||||
"stationFilterTitle": "Station filter",
|
|
||||||
"stationFilterSubtitle": "Only stations verified as active",
|
|
||||||
"backgroundAudioTitle": "Background audio",
|
|
||||||
"backgroundAudioSubtitle": "Continues when the screen turns off",
|
|
||||||
"dash": "—",
|
|
||||||
"@recordingsPathSaveError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationActive": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationMain": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationCurrent": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationAutoUsing": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupShareText": {
|
|
||||||
"placeholders": {
|
|
||||||
"date": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupExportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupImportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@appVersionSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"version": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cancelAction": "Cancel",
|
|
||||||
"equalizerTitle": "Equalizer",
|
|
||||||
"recordingsOpenFolder": "Open folder",
|
|
||||||
"recordingsOpenFolderError": "Could not open the folder: {error}",
|
|
||||||
"recordingsMaxSizeTitle": "Maximum recording size",
|
|
||||||
"recordingsMaxSizeSubtitle": "Current limit: {size} MB",
|
|
||||||
"recordingsMaxSizeDialogTitle": "Maximum size per recording",
|
|
||||||
"recordingsMaxSizeMbLabel": "Maximum megabytes",
|
|
||||||
"recordingsMaxSizeSaved": "Recording limit updated to {size} MB",
|
|
||||||
"@recordingsOpenFolderError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSaved": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stationOrderTitle": "Station order",
|
|
||||||
"stationOrderByName": "By name",
|
|
||||||
"stationOrderByQuality": "By quality",
|
|
||||||
"stationOrderScopeDescription": "Applies to favorites, searches, nearby stations and quick lists.",
|
|
||||||
"favoriteGroupsTitle": "Favorite lists",
|
|
||||||
"favoriteGroupsDescription": "Create short lists to organize your saved stations.",
|
|
||||||
"favoriteGroupsAdd": "Add list",
|
|
||||||
"favoriteGroupsEdit": "Edit list",
|
|
||||||
"favoriteGroupsDelete": "Delete list",
|
|
||||||
"favoriteGroupsNameLabel": "List name",
|
|
||||||
"favoriteGroupsNameTooLong": "Maximum 28 characters.",
|
|
||||||
"favoriteGroupsUnassigned": "Unassigned",
|
|
||||||
"favoriteGroupsProtectedHint": "Default list: it cannot be edited or deleted.",
|
|
||||||
"favoriteGroupsCreated": "List created",
|
|
||||||
"favoriteGroupsUpdated": "List updated",
|
|
||||||
"favoriteGroupsDeleted": "List deleted; its stations return to Unassigned.",
|
|
||||||
"favoriteGroupsAssign": "Move to list",
|
|
||||||
"favoriteGroupsAssignSubtitle": "Current list: {groupName}",
|
|
||||||
"favoriteGroupsAssigned": "{stationName} moved to {groupName}",
|
|
||||||
"favoritesTitle": "Favorites",
|
|
||||||
"favoritesEmptyTitle": "No favorites yet",
|
|
||||||
"favoritesEmptySubtitle": "Tap the heart on any station to save it to your collection.",
|
|
||||||
"favoritesHeaderSubtitle": "Organize your collection by lists and keep important radios close.",
|
|
||||||
"favoritesCollection": "Collection",
|
|
||||||
"favoritesSavedCount": "{count} saved",
|
|
||||||
"favoritesRemoveTooltip": "Remove from favorites",
|
|
||||||
"favoritesRemovedMessage": "{stationName} removed from favorites",
|
|
||||||
"@favoriteGroupsAssignSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoriteGroupsAssigned": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {},
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesSavedCount": {
|
|
||||||
"placeholders": {
|
|
||||||
"count": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesRemovedMessage": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"@@locale": "bn",
|
|
||||||
"appTitle": "PluriWave",
|
|
||||||
"navHome": "Home",
|
|
||||||
"navSearch": "Search",
|
|
||||||
"navFavorites": "Favorites",
|
|
||||||
"navAlarms": "Alarms",
|
|
||||||
"navSettings": "Settings",
|
|
||||||
"actionOk": "OK",
|
|
||||||
"sleepTimer": "Sleep timer",
|
|
||||||
"sleepTimerDescription": "Smooth radio shutdown with an exact countdown.",
|
|
||||||
"cancelTimer": "Cancel timer",
|
|
||||||
"optionOther": "Other",
|
|
||||||
"customDurationTitle": "Custom duration",
|
|
||||||
"durationGreaterThanZero": "Choose a duration greater than zero.",
|
|
||||||
"hoursLabel": "Hours",
|
|
||||||
"minutesLabel": "Minutes",
|
|
||||||
"secondsLabel": "Seconds",
|
|
||||||
"saveQuickAccess": "Save as quick access",
|
|
||||||
"startTimer": "Start timer",
|
|
||||||
"skipCurrentAlarmExecution": "Skipped this execution of {alarmName}.",
|
|
||||||
"@skipCurrentAlarmExecution": {
|
|
||||||
"placeholders": {
|
|
||||||
"alarmName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settingsTitle": "Settings",
|
|
||||||
"settingsSubtitle": "Fine-grained sound control, backups, and custom stations.",
|
|
||||||
"languageSectionTitle": "Language",
|
|
||||||
"languageSectionDescription": "Choose how the app language is displayed.",
|
|
||||||
"languageSystemDefault": "System",
|
|
||||||
"languageSpanish": "Spanish",
|
|
||||||
"languageEnglish": "English",
|
|
||||||
"languageUpdated": "Language updated: {languageName}",
|
|
||||||
"@languageUpdated": {
|
|
||||||
"placeholders": {
|
|
||||||
"languageName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"languageUpdatedSystem": "Language updated: System",
|
|
||||||
"timerSectionTitle": "Sleep timer",
|
|
||||||
"timerSectionAdd": "Add",
|
|
||||||
"timerSectionDescription": "Customize the quick presets shown when automatically stopping the radio.",
|
|
||||||
"timerSectionRestoreRecommended": "Restore recommended times",
|
|
||||||
"newQuickAccessTitle": "New quick access",
|
|
||||||
"saveQuickAccessButton": "Save quick access",
|
|
||||||
"settingsSafeStatus": "Safe",
|
|
||||||
"recordingsSectionTitle": "Recordings",
|
|
||||||
"recordingsFolderDialogTitle": "Select recordings folder",
|
|
||||||
"recordingsPathUpdated": "Recording path updated",
|
|
||||||
"recordingsPathSaveError": "Could not save the path: {error}",
|
|
||||||
"recordingsDefaultFolderRestored": "The internal default folder will be used",
|
|
||||||
"recordingsFolderTitle": "Recordings folder",
|
|
||||||
"recordingsPathCalculating": "Calculating path...",
|
|
||||||
"recordingsChangePath": "Change path",
|
|
||||||
"recordingsUseDefaultPath": "Use default path",
|
|
||||||
"recordingsOriginalStreamHint": "The radio is saved from the original stream, without recompressing.",
|
|
||||||
"equalizerActive": "Active",
|
|
||||||
"equalizerDisabled": "Disabled",
|
|
||||||
"equalizerEnable": "Enable equalizer",
|
|
||||||
"equalizerRealtimeSubtitle": "Changes are applied in real time to the current station.",
|
|
||||||
"equalizerPendingSubtitle": "Changes are saved and will apply when Android enables the effect.",
|
|
||||||
"equalizerPerStationTitle": "Use custom EQ for this favorite",
|
|
||||||
"equalizerPerStationActive": "Active for {stationName}",
|
|
||||||
"equalizerPerStationMain": "Using main EQ for {stationName}",
|
|
||||||
"preferredStationTitle": "Preferred station",
|
|
||||||
"preferredStationDescription": "Preselected for new alarms and available for quick playback.",
|
|
||||||
"preferredStationNoStationsTitle": "No stations available yet",
|
|
||||||
"preferredStationNoStationsSubtitle": "Save favorites or load stations to choose a preferred one.",
|
|
||||||
"preferredStationAutomaticFallback": "Automatic fallback",
|
|
||||||
"preferredStationDefaultFavorite": "Default favorite",
|
|
||||||
"preferredStationCurrent": "Current preferred: {stationName}",
|
|
||||||
"preferredStationAutoUsing": "No favorites: automatically using {stationName}",
|
|
||||||
"preferredStationPlay": "Play preferred",
|
|
||||||
"customStationsTitle": "Custom stations",
|
|
||||||
"customStationsAdd": "Add",
|
|
||||||
"customStationsEmpty": "No custom stations.",
|
|
||||||
"playAction": "Play",
|
|
||||||
"deleteAction": "Delete",
|
|
||||||
"addStationTitle": "Add station",
|
|
||||||
"stationNameLabel": "Name *",
|
|
||||||
"requiredField": "Required field",
|
|
||||||
"streamUrlLabel": "Stream URL *",
|
|
||||||
"invalidUrl": "Invalid URL",
|
|
||||||
"countryOptionalLabel": "Country (optional)",
|
|
||||||
"saveStation": "Save station",
|
|
||||||
"backupSectionTitle": "Backup",
|
|
||||||
"backupExportTitle": "Export configuration",
|
|
||||||
"backupExportSubtitle": "Favorites, custom stations, and EQ presets",
|
|
||||||
"backupImportTitle": "Import configuration",
|
|
||||||
"backupImportSubtitle": "Restore from a backup file",
|
|
||||||
"backupShareSubject": "PluriWave — backup",
|
|
||||||
"backupShareText": "PluriWave configuration exported on {date}",
|
|
||||||
"backupExportError": "Export error: {error}",
|
|
||||||
"backupImportConfirmMessage": "This will add favorites, stations, and presets from the file. Continue?",
|
|
||||||
"backupImportSuccess": "Configuration imported successfully",
|
|
||||||
"backupImportError": "Import error: {error}",
|
|
||||||
"appVersionLoading": "Loading version...",
|
|
||||||
"appVersionSubtitle": "{version} - World radio",
|
|
||||||
"savedFavoritesTitle": "Saved favorites",
|
|
||||||
"stationFilterTitle": "Station filter",
|
|
||||||
"stationFilterSubtitle": "Only stations verified as active",
|
|
||||||
"backgroundAudioTitle": "Background audio",
|
|
||||||
"backgroundAudioSubtitle": "Continues when the screen turns off",
|
|
||||||
"dash": "—",
|
|
||||||
"@recordingsPathSaveError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationActive": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationMain": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationCurrent": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationAutoUsing": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupShareText": {
|
|
||||||
"placeholders": {
|
|
||||||
"date": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupExportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupImportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@appVersionSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"version": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cancelAction": "Cancel",
|
|
||||||
"equalizerTitle": "Equalizer",
|
|
||||||
"recordingsOpenFolder": "Open folder",
|
|
||||||
"recordingsOpenFolderError": "Could not open the folder: {error}",
|
|
||||||
"recordingsMaxSizeTitle": "Maximum recording size",
|
|
||||||
"recordingsMaxSizeSubtitle": "Current limit: {size} MB",
|
|
||||||
"recordingsMaxSizeDialogTitle": "Maximum size per recording",
|
|
||||||
"recordingsMaxSizeMbLabel": "Maximum megabytes",
|
|
||||||
"recordingsMaxSizeSaved": "Recording limit updated to {size} MB",
|
|
||||||
"@recordingsOpenFolderError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSaved": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stationOrderTitle": "Station order",
|
|
||||||
"stationOrderByName": "By name",
|
|
||||||
"stationOrderByQuality": "By quality",
|
|
||||||
"stationOrderScopeDescription": "Applies to favorites, searches, nearby stations and quick lists.",
|
|
||||||
"favoriteGroupsTitle": "Favorite lists",
|
|
||||||
"favoriteGroupsDescription": "Create short lists to organize your saved stations.",
|
|
||||||
"favoriteGroupsAdd": "Add list",
|
|
||||||
"favoriteGroupsEdit": "Edit list",
|
|
||||||
"favoriteGroupsDelete": "Delete list",
|
|
||||||
"favoriteGroupsNameLabel": "List name",
|
|
||||||
"favoriteGroupsNameTooLong": "Maximum 28 characters.",
|
|
||||||
"favoriteGroupsUnassigned": "Unassigned",
|
|
||||||
"favoriteGroupsProtectedHint": "Default list: it cannot be edited or deleted.",
|
|
||||||
"favoriteGroupsCreated": "List created",
|
|
||||||
"favoriteGroupsUpdated": "List updated",
|
|
||||||
"favoriteGroupsDeleted": "List deleted; its stations return to Unassigned.",
|
|
||||||
"favoriteGroupsAssign": "Move to list",
|
|
||||||
"favoriteGroupsAssignSubtitle": "Current list: {groupName}",
|
|
||||||
"favoriteGroupsAssigned": "{stationName} moved to {groupName}",
|
|
||||||
"favoritesTitle": "Favorites",
|
|
||||||
"favoritesEmptyTitle": "No favorites yet",
|
|
||||||
"favoritesEmptySubtitle": "Tap the heart on any station to save it to your collection.",
|
|
||||||
"favoritesHeaderSubtitle": "Organize your collection by lists and keep important radios close.",
|
|
||||||
"favoritesCollection": "Collection",
|
|
||||||
"favoritesSavedCount": "{count} saved",
|
|
||||||
"favoritesRemoveTooltip": "Remove from favorites",
|
|
||||||
"favoritesRemovedMessage": "{stationName} removed from favorites",
|
|
||||||
"@favoriteGroupsAssignSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoriteGroupsAssigned": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {},
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesSavedCount": {
|
|
||||||
"placeholders": {
|
|
||||||
"count": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesRemovedMessage": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"@@locale": "de",
|
|
||||||
"appTitle": "PluriWave",
|
|
||||||
"navHome": "Start",
|
|
||||||
"navSearch": "Suche",
|
|
||||||
"navFavorites": "Favoriten",
|
|
||||||
"navAlarms": "Alarme",
|
|
||||||
"navSettings": "Einstellungen",
|
|
||||||
"actionOk": "OK",
|
|
||||||
"sleepTimer": "Sleep-Timer",
|
|
||||||
"sleepTimerDescription": "Smooth radio shutdown with an exact countdown.",
|
|
||||||
"cancelTimer": "Cancel timer",
|
|
||||||
"optionOther": "Other",
|
|
||||||
"customDurationTitle": "Custom duration",
|
|
||||||
"durationGreaterThanZero": "Choose a duration greater than zero.",
|
|
||||||
"hoursLabel": "Hours",
|
|
||||||
"minutesLabel": "Minutes",
|
|
||||||
"secondsLabel": "Seconds",
|
|
||||||
"saveQuickAccess": "Save as quick access",
|
|
||||||
"startTimer": "Start timer",
|
|
||||||
"skipCurrentAlarmExecution": "Skipped this execution of {alarmName}.",
|
|
||||||
"@skipCurrentAlarmExecution": {
|
|
||||||
"placeholders": {
|
|
||||||
"alarmName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settingsTitle": "Einstellungen",
|
|
||||||
"settingsSubtitle": "Fine-grained sound control, backups, and custom stations.",
|
|
||||||
"languageSectionTitle": "Sprache",
|
|
||||||
"languageSectionDescription": "Choose how the app language is displayed.",
|
|
||||||
"languageSystemDefault": "System",
|
|
||||||
"languageSpanish": "Spanisch",
|
|
||||||
"languageEnglish": "Englisch",
|
|
||||||
"languageUpdated": "Sprache aktualisiert: {languageName}",
|
|
||||||
"@languageUpdated": {
|
|
||||||
"placeholders": {
|
|
||||||
"languageName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"languageUpdatedSystem": "Sprache aktualisiert: System",
|
|
||||||
"timerSectionTitle": "Sleep timer",
|
|
||||||
"timerSectionAdd": "Add",
|
|
||||||
"timerSectionDescription": "Customize the quick presets shown when automatically stopping the radio.",
|
|
||||||
"timerSectionRestoreRecommended": "Restore recommended times",
|
|
||||||
"newQuickAccessTitle": "New quick access",
|
|
||||||
"saveQuickAccessButton": "Save quick access",
|
|
||||||
"settingsSafeStatus": "Safe",
|
|
||||||
"recordingsSectionTitle": "Recordings",
|
|
||||||
"recordingsFolderDialogTitle": "Select recordings folder",
|
|
||||||
"recordingsPathUpdated": "Recording path updated",
|
|
||||||
"recordingsPathSaveError": "Could not save the path: {error}",
|
|
||||||
"recordingsDefaultFolderRestored": "The internal default folder will be used",
|
|
||||||
"recordingsFolderTitle": "Recordings folder",
|
|
||||||
"recordingsPathCalculating": "Calculating path...",
|
|
||||||
"recordingsChangePath": "Change path",
|
|
||||||
"recordingsUseDefaultPath": "Use default path",
|
|
||||||
"recordingsOriginalStreamHint": "The radio is saved from the original stream, without recompressing.",
|
|
||||||
"equalizerActive": "Active",
|
|
||||||
"equalizerDisabled": "Disabled",
|
|
||||||
"equalizerEnable": "Enable equalizer",
|
|
||||||
"equalizerRealtimeSubtitle": "Changes are applied in real time to the current station.",
|
|
||||||
"equalizerPendingSubtitle": "Changes are saved and will apply when Android enables the effect.",
|
|
||||||
"equalizerPerStationTitle": "Use custom EQ for this favorite",
|
|
||||||
"equalizerPerStationActive": "Active for {stationName}",
|
|
||||||
"equalizerPerStationMain": "Using main EQ for {stationName}",
|
|
||||||
"preferredStationTitle": "Preferred station",
|
|
||||||
"preferredStationDescription": "Preselected for new alarms and available for quick playback.",
|
|
||||||
"preferredStationNoStationsTitle": "No stations available yet",
|
|
||||||
"preferredStationNoStationsSubtitle": "Save favorites or load stations to choose a preferred one.",
|
|
||||||
"preferredStationAutomaticFallback": "Automatic fallback",
|
|
||||||
"preferredStationDefaultFavorite": "Default favorite",
|
|
||||||
"preferredStationCurrent": "Current preferred: {stationName}",
|
|
||||||
"preferredStationAutoUsing": "No favorites: automatically using {stationName}",
|
|
||||||
"preferredStationPlay": "Play preferred",
|
|
||||||
"customStationsTitle": "Custom stations",
|
|
||||||
"customStationsAdd": "Add",
|
|
||||||
"customStationsEmpty": "No custom stations.",
|
|
||||||
"playAction": "Play",
|
|
||||||
"deleteAction": "Delete",
|
|
||||||
"addStationTitle": "Add station",
|
|
||||||
"stationNameLabel": "Name *",
|
|
||||||
"requiredField": "Required field",
|
|
||||||
"streamUrlLabel": "Stream URL *",
|
|
||||||
"invalidUrl": "Invalid URL",
|
|
||||||
"countryOptionalLabel": "Country (optional)",
|
|
||||||
"saveStation": "Save station",
|
|
||||||
"backupSectionTitle": "Backup",
|
|
||||||
"backupExportTitle": "Export configuration",
|
|
||||||
"backupExportSubtitle": "Favorites, custom stations, and EQ presets",
|
|
||||||
"backupImportTitle": "Import configuration",
|
|
||||||
"backupImportSubtitle": "Restore from a backup file",
|
|
||||||
"backupShareSubject": "PluriWave — backup",
|
|
||||||
"backupShareText": "PluriWave configuration exported on {date}",
|
|
||||||
"backupExportError": "Export error: {error}",
|
|
||||||
"backupImportConfirmMessage": "This will add favorites, stations, and presets from the file. Continue?",
|
|
||||||
"backupImportSuccess": "Configuration imported successfully",
|
|
||||||
"backupImportError": "Import error: {error}",
|
|
||||||
"appVersionLoading": "Loading version...",
|
|
||||||
"appVersionSubtitle": "{version} - World radio",
|
|
||||||
"savedFavoritesTitle": "Saved favorites",
|
|
||||||
"stationFilterTitle": "Station filter",
|
|
||||||
"stationFilterSubtitle": "Only stations verified as active",
|
|
||||||
"backgroundAudioTitle": "Background audio",
|
|
||||||
"backgroundAudioSubtitle": "Continues when the screen turns off",
|
|
||||||
"dash": "—",
|
|
||||||
"@recordingsPathSaveError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationActive": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationMain": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationCurrent": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationAutoUsing": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupShareText": {
|
|
||||||
"placeholders": {
|
|
||||||
"date": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupExportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupImportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@appVersionSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"version": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cancelAction": "Abbrechen",
|
|
||||||
"equalizerTitle": "Equalizer",
|
|
||||||
"recordingsOpenFolder": "Open folder",
|
|
||||||
"recordingsOpenFolderError": "Could not open the folder: {error}",
|
|
||||||
"recordingsMaxSizeTitle": "Maximum recording size",
|
|
||||||
"recordingsMaxSizeSubtitle": "Current limit: {size} MB",
|
|
||||||
"recordingsMaxSizeDialogTitle": "Maximum size per recording",
|
|
||||||
"recordingsMaxSizeMbLabel": "Maximum megabytes",
|
|
||||||
"recordingsMaxSizeSaved": "Recording limit updated to {size} MB",
|
|
||||||
"@recordingsOpenFolderError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSaved": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stationOrderTitle": "Station order",
|
|
||||||
"stationOrderByName": "By name",
|
|
||||||
"stationOrderByQuality": "By quality",
|
|
||||||
"stationOrderScopeDescription": "Applies to favorites, searches, nearby stations and quick lists.",
|
|
||||||
"favoriteGroupsTitle": "Favorite lists",
|
|
||||||
"favoriteGroupsDescription": "Create short lists to organize your saved stations.",
|
|
||||||
"favoriteGroupsAdd": "Add list",
|
|
||||||
"favoriteGroupsEdit": "Edit list",
|
|
||||||
"favoriteGroupsDelete": "Delete list",
|
|
||||||
"favoriteGroupsNameLabel": "List name",
|
|
||||||
"favoriteGroupsNameTooLong": "Maximum 28 characters.",
|
|
||||||
"favoriteGroupsUnassigned": "Unassigned",
|
|
||||||
"favoriteGroupsProtectedHint": "Default list: it cannot be edited or deleted.",
|
|
||||||
"favoriteGroupsCreated": "List created",
|
|
||||||
"favoriteGroupsUpdated": "List updated",
|
|
||||||
"favoriteGroupsDeleted": "List deleted; its stations return to Unassigned.",
|
|
||||||
"favoriteGroupsAssign": "Move to list",
|
|
||||||
"favoriteGroupsAssignSubtitle": "Current list: {groupName}",
|
|
||||||
"favoriteGroupsAssigned": "{stationName} moved to {groupName}",
|
|
||||||
"favoritesTitle": "Favorites",
|
|
||||||
"favoritesEmptyTitle": "No favorites yet",
|
|
||||||
"favoritesEmptySubtitle": "Tap the heart on any station to save it to your collection.",
|
|
||||||
"favoritesHeaderSubtitle": "Organize your collection by lists and keep important radios close.",
|
|
||||||
"favoritesCollection": "Collection",
|
|
||||||
"favoritesSavedCount": "{count} saved",
|
|
||||||
"favoritesRemoveTooltip": "Remove from favorites",
|
|
||||||
"favoritesRemovedMessage": "{stationName} removed from favorites",
|
|
||||||
"@favoriteGroupsAssignSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoriteGroupsAssigned": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {},
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesSavedCount": {
|
|
||||||
"placeholders": {
|
|
||||||
"count": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesRemovedMessage": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"@@locale": "en",
|
|
||||||
"appTitle": "PluriWave",
|
|
||||||
"navHome": "Home",
|
|
||||||
"navSearch": "Search",
|
|
||||||
"navFavorites": "Favorites",
|
|
||||||
"navAlarms": "Alarms",
|
|
||||||
"navSettings": "Settings",
|
|
||||||
"actionOk": "OK",
|
|
||||||
"sleepTimer": "Sleep timer",
|
|
||||||
"sleepTimerDescription": "Smooth radio shutdown with an exact countdown.",
|
|
||||||
"cancelTimer": "Cancel timer",
|
|
||||||
"optionOther": "Other",
|
|
||||||
"customDurationTitle": "Custom duration",
|
|
||||||
"durationGreaterThanZero": "Choose a duration greater than zero.",
|
|
||||||
"hoursLabel": "Hours",
|
|
||||||
"minutesLabel": "Minutes",
|
|
||||||
"secondsLabel": "Seconds",
|
|
||||||
"saveQuickAccess": "Save as quick access",
|
|
||||||
"startTimer": "Start timer",
|
|
||||||
"skipCurrentAlarmExecution": "Skipped this execution of {alarmName}.",
|
|
||||||
"@skipCurrentAlarmExecution": {
|
|
||||||
"placeholders": {
|
|
||||||
"alarmName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settingsTitle": "Settings",
|
|
||||||
"settingsSubtitle": "Fine-grained sound control, backups, and custom stations.",
|
|
||||||
"languageSectionTitle": "Language",
|
|
||||||
"languageSectionDescription": "Choose how the app language is displayed.",
|
|
||||||
"languageSystemDefault": "System",
|
|
||||||
"languageSpanish": "Spanish",
|
|
||||||
"languageEnglish": "English",
|
|
||||||
"languageUpdated": "Language updated: {languageName}",
|
|
||||||
"@languageUpdated": {
|
|
||||||
"placeholders": {
|
|
||||||
"languageName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"languageUpdatedSystem": "Language updated: System",
|
|
||||||
"timerSectionTitle": "Sleep timer",
|
|
||||||
"timerSectionAdd": "Add",
|
|
||||||
"timerSectionDescription": "Customize the quick presets shown when automatically stopping the radio.",
|
|
||||||
"timerSectionRestoreRecommended": "Restore recommended times",
|
|
||||||
"newQuickAccessTitle": "New quick access",
|
|
||||||
"saveQuickAccessButton": "Save quick access",
|
|
||||||
"settingsSafeStatus": "Safe",
|
|
||||||
"recordingsSectionTitle": "Recordings",
|
|
||||||
"recordingsFolderDialogTitle": "Select recordings folder",
|
|
||||||
"recordingsPathUpdated": "Recording path updated",
|
|
||||||
"recordingsPathSaveError": "Could not save the path: {error}",
|
|
||||||
"recordingsDefaultFolderRestored": "The default internal folder will be used",
|
|
||||||
"recordingsFolderTitle": "Recording folder",
|
|
||||||
"recordingsPathCalculating": "Calculating path...",
|
|
||||||
"recordingsChangePath": "Change path",
|
|
||||||
"recordingsUseDefaultPath": "Use default path",
|
|
||||||
"recordingsOriginalStreamHint": "The radio is saved from the original stream, without recompressing.",
|
|
||||||
"equalizerActive": "Active",
|
|
||||||
"equalizerDisabled": "Disabled",
|
|
||||||
"equalizerEnable": "Enable equalizer",
|
|
||||||
"equalizerRealtimeSubtitle": "Changes are applied in real time to the current station.",
|
|
||||||
"equalizerPendingSubtitle": "Changes are saved and will apply when Android enables the effect.",
|
|
||||||
"equalizerPerStationTitle": "Use custom EQ for this favorite",
|
|
||||||
"equalizerPerStationActive": "Active for {stationName}",
|
|
||||||
"equalizerPerStationMain": "Using main EQ for {stationName}",
|
|
||||||
"preferredStationTitle": "Preferred station",
|
|
||||||
"preferredStationDescription": "Preselected for new alarms and available for quick playback.",
|
|
||||||
"preferredStationNoStationsTitle": "No stations available yet",
|
|
||||||
"preferredStationNoStationsSubtitle": "Save favorites or load stations to choose a preferred one.",
|
|
||||||
"preferredStationAutomaticFallback": "Automatic fallback",
|
|
||||||
"preferredStationDefaultFavorite": "Default favorite",
|
|
||||||
"preferredStationCurrent": "Current preferred: {stationName}",
|
|
||||||
"preferredStationAutoUsing": "No favorites: automatically using {stationName}",
|
|
||||||
"preferredStationPlay": "Play preferred",
|
|
||||||
"customStationsTitle": "Custom stations",
|
|
||||||
"customStationsAdd": "Add",
|
|
||||||
"customStationsEmpty": "No custom stations.",
|
|
||||||
"playAction": "Play",
|
|
||||||
"deleteAction": "Delete",
|
|
||||||
"addStationTitle": "Add station",
|
|
||||||
"stationNameLabel": "Name *",
|
|
||||||
"requiredField": "Required field",
|
|
||||||
"streamUrlLabel": "Stream URL *",
|
|
||||||
"invalidUrl": "Invalid URL",
|
|
||||||
"countryOptionalLabel": "Country (optional)",
|
|
||||||
"saveStation": "Save station",
|
|
||||||
"backupSectionTitle": "Backup",
|
|
||||||
"backupExportTitle": "Export configuration",
|
|
||||||
"backupExportSubtitle": "Favorites, custom stations, and EQ presets",
|
|
||||||
"backupImportTitle": "Import configuration",
|
|
||||||
"backupImportSubtitle": "Restore from a backup file",
|
|
||||||
"backupShareSubject": "PluriWave — backup",
|
|
||||||
"backupShareText": "PluriWave configuration exported on {date}",
|
|
||||||
"backupExportError": "Export error: {error}",
|
|
||||||
"backupImportConfirmMessage": "This will add favorites, stations, and presets from the file. Continue?",
|
|
||||||
"backupImportSuccess": "Configuration imported successfully",
|
|
||||||
"backupImportError": "Import error: {error}",
|
|
||||||
"appVersionLoading": "Loading version...",
|
|
||||||
"appVersionSubtitle": "{version} - World radio",
|
|
||||||
"savedFavoritesTitle": "Saved favorites",
|
|
||||||
"stationFilterTitle": "Station filter",
|
|
||||||
"stationFilterSubtitle": "Only stations verified as active",
|
|
||||||
"backgroundAudioTitle": "Background audio",
|
|
||||||
"backgroundAudioSubtitle": "Continues when the screen turns off",
|
|
||||||
"dash": "—",
|
|
||||||
"@recordingsPathSaveError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationActive": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationMain": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationCurrent": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationAutoUsing": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupShareText": {
|
|
||||||
"placeholders": {
|
|
||||||
"date": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupExportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupImportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@appVersionSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"version": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cancelAction": "Cancel",
|
|
||||||
"equalizerTitle": "Equalizer",
|
|
||||||
"recordingsOpenFolder": "Open folder",
|
|
||||||
"recordingsOpenFolderError": "Could not open the folder: {error}",
|
|
||||||
"recordingsMaxSizeTitle": "Maximum recording size",
|
|
||||||
"recordingsMaxSizeSubtitle": "Current limit: {size} MB",
|
|
||||||
"recordingsMaxSizeDialogTitle": "Maximum size per recording",
|
|
||||||
"recordingsMaxSizeMbLabel": "Maximum megabytes",
|
|
||||||
"recordingsMaxSizeSaved": "Recording limit updated to {size} MB",
|
|
||||||
"@recordingsOpenFolderError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSaved": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stationOrderTitle": "Station order",
|
|
||||||
"stationOrderByName": "By name",
|
|
||||||
"stationOrderByQuality": "By quality",
|
|
||||||
"stationOrderScopeDescription": "Applies to favorites, searches, nearby stations and quick lists.",
|
|
||||||
"favoriteGroupsTitle": "Favorite lists",
|
|
||||||
"favoriteGroupsDescription": "Create short lists to organize your saved stations.",
|
|
||||||
"favoriteGroupsAdd": "Add list",
|
|
||||||
"favoriteGroupsEdit": "Edit list",
|
|
||||||
"favoriteGroupsDelete": "Delete list",
|
|
||||||
"favoriteGroupsNameLabel": "List name",
|
|
||||||
"favoriteGroupsNameTooLong": "Maximum 28 characters.",
|
|
||||||
"favoriteGroupsUnassigned": "Unassigned",
|
|
||||||
"favoriteGroupsProtectedHint": "Default list: it cannot be edited or deleted.",
|
|
||||||
"favoriteGroupsCreated": "List created",
|
|
||||||
"favoriteGroupsUpdated": "List updated",
|
|
||||||
"favoriteGroupsDeleted": "List deleted; its stations return to Unassigned.",
|
|
||||||
"favoriteGroupsAssign": "Move to list",
|
|
||||||
"favoriteGroupsAssignSubtitle": "Current list: {groupName}",
|
|
||||||
"favoriteGroupsAssigned": "{stationName} moved to {groupName}",
|
|
||||||
"favoritesTitle": "Favorites",
|
|
||||||
"favoritesEmptyTitle": "No favorites yet",
|
|
||||||
"favoritesEmptySubtitle": "Tap the heart on any station to save it to your collection.",
|
|
||||||
"favoritesHeaderSubtitle": "Organize your collection by lists and keep important radios close.",
|
|
||||||
"favoritesCollection": "Collection",
|
|
||||||
"favoritesSavedCount": "{count} saved",
|
|
||||||
"favoritesRemoveTooltip": "Remove from favorites",
|
|
||||||
"favoritesRemovedMessage": "{stationName} removed from favorites",
|
|
||||||
"@favoriteGroupsAssignSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoriteGroupsAssigned": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {},
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesSavedCount": {
|
|
||||||
"placeholders": {
|
|
||||||
"count": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesRemovedMessage": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"@@locale": "es",
|
|
||||||
"appTitle": "PluriWave",
|
|
||||||
"navHome": "Inicio",
|
|
||||||
"navSearch": "Buscar",
|
|
||||||
"navFavorites": "Favoritos",
|
|
||||||
"navAlarms": "Alarmas",
|
|
||||||
"navSettings": "Ajustes",
|
|
||||||
"actionOk": "OK",
|
|
||||||
"sleepTimer": "Timer de sueño",
|
|
||||||
"sleepTimerDescription": "Apagado suave de la radio con cuenta atrás exacta.",
|
|
||||||
"cancelTimer": "Cancelar timer",
|
|
||||||
"optionOther": "Otro",
|
|
||||||
"customDurationTitle": "Duración personalizada",
|
|
||||||
"durationGreaterThanZero": "Elegí una duración mayor que cero.",
|
|
||||||
"hoursLabel": "Horas",
|
|
||||||
"minutesLabel": "Minutos",
|
|
||||||
"secondsLabel": "Segundos",
|
|
||||||
"saveQuickAccess": "Guardar como acceso rápido",
|
|
||||||
"startTimer": "Iniciar timer",
|
|
||||||
"skipCurrentAlarmExecution": "Omitida esta ejecución de {alarmName}.",
|
|
||||||
"@skipCurrentAlarmExecution": {
|
|
||||||
"placeholders": {
|
|
||||||
"alarmName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settingsTitle": "Ajustes",
|
|
||||||
"settingsSubtitle": "Control fino de sonido, copias de seguridad y emisoras personalizadas.",
|
|
||||||
"languageSectionTitle": "Idioma",
|
|
||||||
"languageSectionDescription": "Elegí cómo se muestra el idioma de la app.",
|
|
||||||
"languageSystemDefault": "Sistema",
|
|
||||||
"languageSpanish": "Español",
|
|
||||||
"languageEnglish": "Inglés",
|
|
||||||
"languageUpdated": "Idioma actualizado: {languageName}",
|
|
||||||
"@languageUpdated": {
|
|
||||||
"placeholders": {
|
|
||||||
"languageName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"languageUpdatedSystem": "Idioma actualizado: Sistema",
|
|
||||||
"timerSectionTitle": "Timer de sueño",
|
|
||||||
"timerSectionAdd": "Añadir",
|
|
||||||
"timerSectionDescription": "Personalizá los accesos rápidos que aparecen al apagar la radio automáticamente.",
|
|
||||||
"timerSectionRestoreRecommended": "Restaurar tiempos recomendados",
|
|
||||||
"newQuickAccessTitle": "Nuevo acceso rápido",
|
|
||||||
"saveQuickAccessButton": "Guardar acceso rápido",
|
|
||||||
"settingsSafeStatus": "Seguro",
|
|
||||||
"recordingsSectionTitle": "Grabaciones",
|
|
||||||
"recordingsFolderDialogTitle": "Selecciona la carpeta de grabaciones",
|
|
||||||
"recordingsPathUpdated": "Ruta de grabación actualizada",
|
|
||||||
"recordingsPathSaveError": "No se pudo guardar la ruta: {error}",
|
|
||||||
"recordingsDefaultFolderRestored": "Se usará la carpeta interna por defecto",
|
|
||||||
"recordingsFolderTitle": "Carpeta de grabación",
|
|
||||||
"recordingsPathCalculating": "Calculando ruta...",
|
|
||||||
"recordingsChangePath": "Cambiar ruta",
|
|
||||||
"recordingsUseDefaultPath": "Usar ruta por defecto",
|
|
||||||
"recordingsOriginalStreamHint": "La radio se guarda desde el stream original, sin recomprimir.",
|
|
||||||
"equalizerActive": "Activo",
|
|
||||||
"equalizerDisabled": "Desactivado",
|
|
||||||
"equalizerEnable": "Activar ecualizador",
|
|
||||||
"equalizerRealtimeSubtitle": "Los cambios se aplican en tiempo real a la emisora actual.",
|
|
||||||
"equalizerPendingSubtitle": "Se guardan los cambios y se aplicarán cuando Android habilite el efecto.",
|
|
||||||
"equalizerPerStationTitle": "Usar EQ propio para esta favorita",
|
|
||||||
"equalizerPerStationActive": "Activo para {stationName}",
|
|
||||||
"equalizerPerStationMain": "Usando EQ principal para {stationName}",
|
|
||||||
"preferredStationTitle": "Emisora preferida",
|
|
||||||
"preferredStationDescription": "Se preselecciona al crear alarmas y puede iniciarse como reproducción rápida.",
|
|
||||||
"preferredStationNoStationsTitle": "Todavía no hay emisoras disponibles",
|
|
||||||
"preferredStationNoStationsSubtitle": "Guardá favoritas o cargá emisoras para elegir una preferida.",
|
|
||||||
"preferredStationAutomaticFallback": "Fallback automático",
|
|
||||||
"preferredStationDefaultFavorite": "Favorita por defecto",
|
|
||||||
"preferredStationCurrent": "Preferida actual: {stationName}",
|
|
||||||
"preferredStationAutoUsing": "Sin favoritas: usando automáticamente {stationName}",
|
|
||||||
"preferredStationPlay": "Reproducir preferida",
|
|
||||||
"customStationsTitle": "Emisoras personalizadas",
|
|
||||||
"customStationsAdd": "Añadir",
|
|
||||||
"customStationsEmpty": "No hay emisoras personalizadas.",
|
|
||||||
"playAction": "Reproducir",
|
|
||||||
"deleteAction": "Eliminar",
|
|
||||||
"addStationTitle": "Añadir emisora",
|
|
||||||
"stationNameLabel": "Nombre *",
|
|
||||||
"requiredField": "Campo obligatorio",
|
|
||||||
"streamUrlLabel": "URL del stream *",
|
|
||||||
"invalidUrl": "URL no válida",
|
|
||||||
"countryOptionalLabel": "País (opcional)",
|
|
||||||
"saveStation": "Guardar emisora",
|
|
||||||
"backupSectionTitle": "Copia de seguridad",
|
|
||||||
"backupExportTitle": "Exportar configuración",
|
|
||||||
"backupExportSubtitle": "Favoritos, emisoras custom y presets de EQ",
|
|
||||||
"backupImportTitle": "Importar configuración",
|
|
||||||
"backupImportSubtitle": "Restaurar desde un fichero de copia de seguridad",
|
|
||||||
"backupShareSubject": "PluriWave — copia de seguridad",
|
|
||||||
"backupShareText": "Configuración de PluriWave exportada el {date}",
|
|
||||||
"backupExportError": "Error al exportar: {error}",
|
|
||||||
"backupImportConfirmMessage": "Esto añadirá los favoritos, emisoras y presets del fichero. ¿Continuar?",
|
|
||||||
"backupImportSuccess": "Configuración importada correctamente",
|
|
||||||
"backupImportError": "Error al importar: {error}",
|
|
||||||
"appVersionLoading": "Cargando versión...",
|
|
||||||
"appVersionSubtitle": "{version} - Radio mundial",
|
|
||||||
"savedFavoritesTitle": "Favoritos guardados",
|
|
||||||
"stationFilterTitle": "Filtro de emisoras",
|
|
||||||
"stationFilterSubtitle": "Solo emisoras verificadas como activas",
|
|
||||||
"backgroundAudioTitle": "Audio en background",
|
|
||||||
"backgroundAudioSubtitle": "Continúa al apagar la pantalla",
|
|
||||||
"dash": "—",
|
|
||||||
"@recordingsPathSaveError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationActive": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@equalizerPerStationMain": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationCurrent": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@preferredStationAutoUsing": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupShareText": {
|
|
||||||
"placeholders": {
|
|
||||||
"date": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupExportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@backupImportError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@appVersionSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"version": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cancelAction": "Cancelar",
|
|
||||||
"equalizerTitle": "Ecualizador",
|
|
||||||
"recordingsOpenFolder": "Abrir carpeta",
|
|
||||||
"recordingsOpenFolderError": "No se pudo abrir la carpeta: {error}",
|
|
||||||
"recordingsMaxSizeTitle": "Tamaño máximo de grabación",
|
|
||||||
"recordingsMaxSizeSubtitle": "Límite actual: {size} MB",
|
|
||||||
"recordingsMaxSizeDialogTitle": "Tamaño máximo por grabación",
|
|
||||||
"recordingsMaxSizeMbLabel": "Megabytes máximos",
|
|
||||||
"recordingsMaxSizeSaved": "Límite de grabación actualizado a {size} MB",
|
|
||||||
"@recordingsOpenFolderError": {
|
|
||||||
"placeholders": {
|
|
||||||
"error": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@recordingsMaxSizeSaved": {
|
|
||||||
"placeholders": {
|
|
||||||
"size": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stationOrderTitle": "Orden de emisoras",
|
|
||||||
"stationOrderByName": "Por nombre",
|
|
||||||
"stationOrderByQuality": "Por calidad",
|
|
||||||
"stationOrderScopeDescription": "Se aplica a favoritos, búsquedas, emisoras cercanas y listados rápidos.",
|
|
||||||
"favoriteGroupsTitle": "Listas de favoritos",
|
|
||||||
"favoriteGroupsDescription": "Creá listas cortas para organizar tus emisoras guardadas.",
|
|
||||||
"favoriteGroupsAdd": "Añadir lista",
|
|
||||||
"favoriteGroupsEdit": "Editar lista",
|
|
||||||
"favoriteGroupsDelete": "Eliminar lista",
|
|
||||||
"favoriteGroupsNameLabel": "Nombre de la lista",
|
|
||||||
"favoriteGroupsNameTooLong": "Máximo 28 caracteres.",
|
|
||||||
"favoriteGroupsUnassigned": "Sin asignar",
|
|
||||||
"favoriteGroupsProtectedHint": "Lista por defecto: no se puede editar ni borrar.",
|
|
||||||
"favoriteGroupsCreated": "Lista creada",
|
|
||||||
"favoriteGroupsUpdated": "Lista actualizada",
|
|
||||||
"favoriteGroupsDeleted": "Lista eliminada; sus emisoras vuelven a Sin asignar.",
|
|
||||||
"favoriteGroupsAssign": "Mover a lista",
|
|
||||||
"favoriteGroupsAssignSubtitle": "Lista actual: {groupName}",
|
|
||||||
"favoriteGroupsAssigned": "{stationName} movida a {groupName}",
|
|
||||||
"favoritesTitle": "Favoritos",
|
|
||||||
"favoritesEmptyTitle": "Sin favoritos aún",
|
|
||||||
"favoritesEmptySubtitle": "Tocá el corazón en cualquier emisora para guardarla en tu colección.",
|
|
||||||
"favoritesHeaderSubtitle": "Organizá tu colección por listas y dejá cerca las radios importantes.",
|
|
||||||
"favoritesCollection": "Colección",
|
|
||||||
"favoritesSavedCount": "{count} guardadas",
|
|
||||||
"favoritesRemoveTooltip": "Eliminar de favoritos",
|
|
||||||
"favoritesRemovedMessage": "{stationName} eliminada de favoritos",
|
|
||||||
"@favoriteGroupsAssignSubtitle": {
|
|
||||||
"placeholders": {
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoriteGroupsAssigned": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {},
|
|
||||||
"groupName": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesSavedCount": {
|
|
||||||
"placeholders": {
|
|
||||||
"count": {
|
|
||||||
"type": "int"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@favoritesRemovedMessage": {
|
|
||||||
"placeholders": {
|
|
||||||
"stationName": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||